From 98bb2f1cd2b6eb794ecaf5ce4fcc3c79ee4df3e5 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 12 Mar 2012 15:57:17 -0700 Subject: Fix another instance of the _dl_random masking bug, plus coding style. * sysdeps/generic/dl-osinfo.h (_dl_setup_stack_chk_guard): Fix masking out of the most significant byte of random value used. * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard): Fix coding style in previous change. --- sysdeps/unix/sysv/linux/dl-osinfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h index 1ff8a2f6a2..d0f41a7b2c 100644 --- a/sysdeps/unix/sysv/linux/dl-osinfo.h +++ b/sysdeps/unix/sysv/linux/dl-osinfo.h @@ -95,9 +95,9 @@ _dl_setup_stack_chk_guard (void *dl_random) directly and not use the kernel-provided data to seed a PRNG. */ memcpy (ret.bytes, dl_random, sizeof (ret)); #if BYTE_ORDER == LITTLE_ENDIAN - ret.num &= ~(uintptr_t)0xff; + ret.num &= ~(uintptr_t) 0xff; #elif BYTE_ORDER == BIG_ENDIAN - ret.num &= ~((uintptr_t)0xff << (8 * (sizeof (ret) - 1))); + ret.num &= ~((uintptr_t) 0xff << (8 * (sizeof (ret) - 1))); #else # error "BYTE_ORDER unknown" #endif -- cgit 1.4.1