1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

Fix typing of the bit twiddling done in _dl_setup_stack_chk_guard.

* sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard):
	Fix masking out of the most significant byte of random value used.
This commit is contained in:
David S. Miller
2012-03-11 19:41:43 -07:00
parent 6e226b094f
commit cb9d617437
2 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
2012-03-11 David S. Miller <davem@davemloft.net> 2012-03-11 David S. Miller <davem@davemloft.net>
* sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard):
Fix masking out of the most significant byte of random value used.
* sysdeps/sparc/fpu/libm-test-ulps: Update. * sysdeps/sparc/fpu/libm-test-ulps: Update.
2012-03-10 Andreas Schwab <schwab@linux-m68k.org> 2012-03-10 Andreas Schwab <schwab@linux-m68k.org>

View File

@@ -95,9 +95,9 @@ _dl_setup_stack_chk_guard (void *dl_random)
directly and not use the kernel-provided data to seed a PRNG. */ directly and not use the kernel-provided data to seed a PRNG. */
memcpy (ret.bytes, dl_random, sizeof (ret)); memcpy (ret.bytes, dl_random, sizeof (ret));
#if BYTE_ORDER == LITTLE_ENDIAN #if BYTE_ORDER == LITTLE_ENDIAN
ret.num &= ~0xff; ret.num &= ~(uintptr_t)0xff;
#elif BYTE_ORDER == BIG_ENDIAN #elif BYTE_ORDER == BIG_ENDIAN
ret.num &= ~(0xff << (8 * (sizeof (ret) - 1))); ret.num &= ~((uintptr_t)0xff << (8 * (sizeof (ret) - 1)));
#else #else
# error "BYTE_ORDER unknown" # error "BYTE_ORDER unknown"
#endif #endif