This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-360-g98bb2f1


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  98bb2f1cd2b6eb794ecaf5ce4fcc3c79ee4df3e5 (commit)
      from  b4b2eb5eae714b97d6a4315846e5fec72096806c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=98bb2f1cd2b6eb794ecaf5ce4fcc3c79ee4df3e5

commit 98bb2f1cd2b6eb794ecaf5ce4fcc3c79ee4df3e5
Author: David S. Miller <davem@davemloft.net>
Date:   Mon Mar 12 15:57:17 2012 -0700

    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.

diff --git a/ChangeLog b/ChangeLog
index 2d9dd85..e9ea42a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-03-12  David S. Miller  <davem@davemloft.net>
 
+	* 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/kernel-features.h
 	(__ASSUME_CLONE_THREAD_FLAGS): Set on sparc when 2.5.64 and later.
 	(__ASSUME_TGKILL): Set on sparc when 2.6.1 and later, simplify
diff --git a/sysdeps/generic/dl-osinfo.h b/sysdeps/generic/dl-osinfo.h
index 548fc46..983cd55 100644
--- a/sysdeps/generic/dl-osinfo.h
+++ b/sysdeps/generic/dl-osinfo.h
@@ -37,9 +37,9 @@ _dl_setup_stack_chk_guard (void *dl_random)
     {
       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
diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
index 1ff8a2f..d0f41a7 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

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |    5 +++++
 sysdeps/generic/dl-osinfo.h         |    4 ++--
 sysdeps/unix/sysv/linux/dl-osinfo.h |    4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]