aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-11 19:41:43 -0700
committerDavid S. Miller <davem@davemloft.net>2012-03-11 19:41:43 -0700
commitcb9d617437084b4ebf02e50c0a82c5dd2582029a (patch)
treecd3906a515d6af0330aadf8b8327f77f61d56c35 /sysdeps/unix
parent6e226b094f4d9fb00797f93d89773dc12811fd0f (diff)
downloadglibc-cb9d617437084b4ebf02e50c0a82c5dd2582029a.tar
glibc-cb9d617437084b4ebf02e50c0a82c5dd2582029a.tar.gz
glibc-cb9d617437084b4ebf02e50c0a82c5dd2582029a.tar.bz2
glibc-cb9d617437084b4ebf02e50c0a82c5dd2582029a.zip
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.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/dl-osinfo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
index 780b20ab6a..1ff8a2f6a2 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 &= ~0xff;
+ ret.num &= ~(uintptr_t)0xff;
#elif BYTE_ORDER == BIG_ENDIAN
- ret.num &= ~(0xff << (8 * (sizeof (ret) - 1)));
+ ret.num &= ~((uintptr_t)0xff << (8 * (sizeof (ret) - 1)));
#else
# error "BYTE_ORDER unknown"
#endif