]> granicus.if.org Git - strace/blobdiff - io.c
Fix decoding of preadv syscall in case of short read
[strace] / io.c
diff --git a/io.c b/io.c
index cda5f92c2589838d8806d5e299e0966b1d414f1a..d8444f3988f5cc38c064eaac10afd76caa4cca00 100644 (file)
--- a/io.c
+++ b/io.c
@@ -221,7 +221,8 @@ SYS_FUNC(preadv)
                printfd(tcp, tcp->u_arg[0]);
                tprints(", ");
        } else {
-               tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
+               tprint_iov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1], 1,
+                               tcp->u_rval);
                tprintf(", %lu, ", tcp->u_arg[2]);
                print_lld_from_low_high_val(tcp, 3);
        }