printfd(tcp, tcp->u_arg[0]);
tprints(", ");
} else {
- tprint_iov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1],
+ unsigned long len = widen_to_ulong(tcp->u_arg[2]);
+
+ tprint_iov_upto(tcp, len, tcp->u_arg[1],
syserror(tcp) ? IOV_DECODE_ADDR :
IOV_DECODE_STR, tcp->u_rval);
- tprintf(", %lu, ", tcp->u_arg[2]);
+ tprintf(", %lu, ", len);
print_lld_from_low_high_val(tcp, 3);
if (flags_arg >= 0) {
tprints(", ");
static int
do_pwritev(struct tcb *tcp, const int flags_arg)
{
+ unsigned long len = widen_to_ulong(tcp->u_arg[2]);
+
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
- tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR);
- tprintf(", %lu, ", tcp->u_arg[2]);
+ tprint_iov(tcp, len, tcp->u_arg[1], IOV_DECODE_STR);
+ tprintf(", %lu, ", len);
print_lld_from_low_high_val(tcp, 3);
if (flags_arg >= 0) {
tprints(", ");