From: Dmitry V. Levin Date: Fri, 23 Dec 2016 23:43:53 +0000 (+0000) Subject: sysctl: cast pointers to kernel_ureg_t instead of long X-Git-Tag: v4.16~246 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8631ca4bc4c302c83d48b595a3110349bff4919;p=strace sysctl: cast pointers to kernel_ureg_t instead of long * sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldlenp pointer to kernel_ureg_t instead of long. --- diff --git a/sysctl.c b/sysctl.c index 03e98c19..12763ac4 100644 --- a/sysctl.c +++ b/sysctl.c @@ -167,7 +167,7 @@ SYS_FUNC(sysctl) size_t oldlen = 0; if (info.oldval == NULL) { tprints("NULL"); - } else if (umove(tcp, (long)info.oldlenp, &oldlen) >= 0 + } else if (umove(tcp, (kernel_ureg_t) info.oldlenp, &oldlen) >= 0 && info.nlen >= 2 && ((name[0] == CTL_KERN && (name[1] == KERN_OSRELEASE