mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
ubsan: undefined shift in mach-o.c
This one was logically wrong too. If file_ptr was 64 bits, then -1U is extended to 0x00000000ffffffff, probably not what was intended here. * mach-o.c (FILE_ALIGN): Correct expression.
This commit is contained in:
@ -36,7 +36,7 @@
|
||||
#define bfd_mach_o_mkobject bfd_mach_o_gen_mkobject
|
||||
|
||||
#define FILE_ALIGN(off, algn) \
|
||||
(((off) + ((file_ptr) 1 << (algn)) - 1) & ((file_ptr) -1U << (algn)))
|
||||
(((off) + ((ufile_ptr) 1 << (algn)) - 1) & ((ufile_ptr) -1 << (algn)))
|
||||
|
||||
static bool
|
||||
bfd_mach_o_read_dyld_content (bfd *abfd, bfd_mach_o_dyld_info_command *cmd);
|
||||
|
Reference in New Issue
Block a user