]> granicus.if.org Git - strace/commitdiff
sysctl: cast pointers to kernel_ureg_t instead of long
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 23 Dec 2016 23:43:53 +0000 (23:43 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 24 Dec 2016 14:58:42 +0000 (14:58 +0000)
* sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldlenp pointer
to kernel_ureg_t instead of long.

sysctl.c

index 03e98c195a2e1cf6d77eb25697acb7017f2c1af5..12763ac4b0bee09f5f4434cbe101cf261e980454 100644 (file)
--- 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