]> granicus.if.org Git - strace/commitdiff
Fix the length argument passed from print_iovec to decode_netlink
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 17 Apr 2017 04:37:11 +0000 (04:37 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 17 Apr 2017 04:37:11 +0000 (04:37 +0000)
* io.c (print_iovec): Pass the actual length to decode_netlink
instead of the original length.
* NEWS: Mention this fix.

NEWS
io.c

diff --git a/NEWS b/NEWS
index 652aa813b16ef4574c3443fbc6971ae06d48ef07..ba3e36a2c991b31a3f33423fcca92eaadf80364a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ Noteworthy changes in release ?.?? (????-??-??)
 * Bug fixes
   * Fixed decoding of flags argument of preadv2 and pwritev2 syscalls on x32.
   * Fixed the number of arguments and tracing flags of alpha specific syscalls.
+  * Fixed decoding of netlink messages received within struct msghdr.
 
 Noteworthy changes in release 4.16 (2017-02-14)
 ===============================================
diff --git a/io.c b/io.c
index a4f6b8e8c9d229ae525ab90712929edfbbb49fbe..259ad3432fe4ed3358246fdd5763e375c76704d5 100644 (file)
--- a/io.c
+++ b/io.c
@@ -94,7 +94,7 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
                                len = c->data_size;
                        if (c->data_size != (kernel_ulong_t) -1)
                                c->data_size -= len;
-                       decode_netlink(tcp, iov[0], iov[1]);
+                       decode_netlink(tcp, iov[0], len);
                        break;
                default:
                        printaddr(iov[0]);