]> granicus.if.org Git - strace/commitdiff
syscall.c: use xsprintf instead of sprintf
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 6 Jan 2018 01:45:16 +0000 (01:45 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 7 Jan 2018 00:05:42 +0000 (00:05 +0000)
* syscall.c: Include "xstring.h".
(get_scno): Replace sprintf with xsprintf.

syscall.c

index 0ca32abd562de4212552cba583ee7a772ed97d83..14c0ea181183e7b0edd1a8d7fb70c9d2520eb52b 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -59,6 +59,7 @@
 #endif
 
 #include "syscall.h"
+#include "xstring.h"
 
 /* Define these shorthand notations to simplify the syscallent files. */
 #include "sysent_shorthand_defs.h"
@@ -1203,7 +1204,7 @@ get_scno(struct tcb *tcp)
                s->ent.sen = SEN_printargs;
                s->ent.sys_func = printargs;
                s->ent.sys_name = s->buf;
-               sprintf(s->buf, "syscall_%" PRI_klu, shuffle_scno(tcp->scno));
+               xsprintf(s->buf, "syscall_%" PRI_klu, shuffle_scno(tcp->scno));
 
                tcp->s_ent = &s->ent;
                tcp->qual_flg = QUAL_RAW | DEFAULT_QUAL_FLAGS;