[PATCH] libctf: Pass format argument to asprintf
H.J. Lu
hjl.tools@gmail.com
Mon Nov 23 15:07:37 GMT 2020
PR libctf/26934
* ctf-dump.c (ctf_dump_objts): Pass format argument to asprintf.
---
libctf/ctf-dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c
index ccf4b3cb2b..5c3041f8e5 100644
--- a/libctf/ctf-dump.c
+++ b/libctf/ctf-dump.c
@@ -403,7 +403,7 @@ ctf_dump_objts (ctf_dict_t *fp, ctf_dump_state_t *state, int functions)
goto out;
}
- if (asprintf (&typestr, ctf_errmsg (ctf_errno (fp))) < 0)
+ if (asprintf (&typestr, "%s", ctf_errmsg (ctf_errno (fp))) < 0)
goto oom;
err = -1;
--
2.28.0
More information about the Binutils
mailing list