]> granicus.if.org Git - strace/commitdiff
v4l2.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)
* v4l2.c: Include "xstring.h".
(print_v4l2_create_buffers): Replace sprintf with xsprintf.

v4l2.c

diff --git a/v4l2.c b/v4l2.c
index 097b13ac8c2241ce64cc0f063e6d87052468f226..4a0cbdc48edb69d39df3d309da62be8af7945be2 100644 (file)
--- a/v4l2.c
+++ b/v4l2.c
@@ -58,6 +58,7 @@ typedef struct v4l2_standard struct_v4l2_standard;
 #include MPERS_DEFS
 
 #include "print_fields.h"
+#include "xstring.h"
 
 /* some historical constants */
 #ifndef V4L2_CID_HCENTER
@@ -975,7 +976,7 @@ print_v4l2_create_buffers(struct tcb *const tcp, const kernel_ulong_t arg)
        if (syserror(tcp) || umove(tcp, arg, &b))
                return RVAL_IOCTL_DECODED;
 
-       sprintf(outstr, fmt, b.index, b.count);
+       xsprintf(outstr, fmt, b.index, b.count);
        tcp->auxstr = outstr;
 
        return RVAL_IOCTL_DECODED | RVAL_STR;