]> granicus.if.org Git - strace/commitdiff
fadvise: use getarg_ull for obtaining len argument of fadvise64 syscall
authorEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 21 Sep 2016 21:21:35 +0000 (00:21 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 28 Sep 2016 03:00:10 +0000 (03:00 +0000)
Since its type is size_t, it is 64-bit wide on x32 and special care
should be taken in order to obtain it.

* fadvise.c (SYS_FUNC(fadvise64)): Use getarg_ull for obtaining value
of "len" syscall argument.

fadvise.c

index 208f5332ef74beed3d730bce30c71d6dc82c5fad..34933f77fcb4e1e741f26a662f7945062e2317d4 100644 (file)
--- a/fadvise.c
+++ b/fadvise.c
@@ -42,7 +42,7 @@ SYS_FUNC(fadvise64)
 
        printfd(tcp, tcp->u_arg[0]);
        argn = printllval(tcp, ", %lld", 1);
-       tprintf(", %lu, ", tcp->u_arg[argn++]);
+       tprintf(", %llu, ", getarg_ull(tcp, argn++));
        printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");
 
        return RVAL_DECODED;