]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/x86/ia32/ia32_aout.c
Sanitize the type of struct user.u_ar0
[mirror_ubuntu-artful-kernel.git] / arch / x86 / ia32 / ia32_aout.c
index e4c12079171b682a5a45bc5d70daedec3536e2aa..58cccb6483b0580d28d935b4692f62b2675f7d02 100644 (file)
@@ -172,8 +172,7 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file,
        has_dumped = 1;
        current->flags |= PF_DUMPCORE;
        strncpy(dump.u_comm, current->comm, sizeof(current->comm));
-       dump.u_ar0 = (u32)(((unsigned long)(&dump.regs)) -
-                          ((unsigned long)(&dump)));
+       dump.u_ar0 = offsetof(struct user32, regs);
        dump.signal = signr;
        dump_thread32(regs, &dump);