mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +00:00
elf.h SHF_EXCLUDE signed int 31 bit shift triggers undefined behaviour.
Any use of SHF_EXCLUDE in code that tries to check it against sh_flags will trigger undefined behaviour because it is defined as a 31 bit shift against an signed integer. Fix by explicitly using an unsigned int.
This commit is contained in:
parent
3f2e21e9cf
commit
fb4041ae53
@ -1,3 +1,7 @@
|
||||
2015-04-28 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* elf/elf.h (SHF_EXCLUDE): Use unsigned 1 for shift.
|
||||
|
||||
2015-04-27 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data: Remove
|
||||
|
@ -371,7 +371,7 @@ typedef struct
|
||||
#define SHF_MASKPROC 0xf0000000 /* Processor-specific */
|
||||
#define SHF_ORDERED (1 << 30) /* Special ordering requirement
|
||||
(Solaris). */
|
||||
#define SHF_EXCLUDE (1 << 31) /* Section is excluded unless
|
||||
#define SHF_EXCLUDE (1U << 31) /* Section is excluded unless
|
||||
referenced or allocated (Solaris).*/
|
||||
|
||||
/* Section group handling. */
|
||||
|
Loading…
Reference in New Issue
Block a user