]> granicus.if.org Git - strace/commitdiff
ldt.c: replace sprintf with xsprintf
authorEugene Syromyatnikov <evgsyr@gmail.com>
Fri, 5 Jan 2018 20:03:21 +0000 (21:03 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 7 Jan 2018 00:05:42 +0000 (00:05 +0000)
* ldt.c: Include "xstring.h".
(SYS_FUNC(set_thread_area)): Replace sprintf with xsprintf.

ldt.c

diff --git a/ldt.c b/ldt.c
index 81bc8ae39abd2e7f536632d7c75e9fd7232652f4..068d859895821433eaec5fa9892208e71d94a346 100644 (file)
--- a/ldt.c
+++ b/ldt.c
@@ -38,6 +38,8 @@
 
 # include <asm/ldt.h>
 
+# include "xstring.h"
+
 void
 print_user_desc(struct tcb *const tcp, const kernel_ulong_t addr)
 {
@@ -91,7 +93,7 @@ SYS_FUNC(set_thread_area)
                } else {
                        static char outstr[32];
 
-                       sprintf(outstr, "entry_number:%d", desc.entry_number);
+                       xsprintf(outstr, "entry_number:%d", desc.entry_number);
                        tcp->auxstr = outstr;
                        return RVAL_STR;
                }