mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
PR26462 UBSAN: reloc.c:473 shift exponent 4294967295
PR 26462 * reloc.c (bfd_check_overflow): Return early if zero bitsize.
This commit is contained in:
parent
2ac865acf0
commit
cd570d497e
@ -1,3 +1,8 @@
|
||||
2020-08-27 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 26462
|
||||
* reloc.c (bfd_check_overflow): Return early if zero bitsize.
|
||||
|
||||
2020-08-27 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* elf32-arm.c (elf32_arm_final_link_relocate): Don't segfault
|
||||
|
@ -466,6 +466,9 @@ bfd_check_overflow (enum complain_overflow how,
|
||||
bfd_vma fieldmask, addrmask, signmask, ss, a;
|
||||
bfd_reloc_status_type flag = bfd_reloc_ok;
|
||||
|
||||
if (bitsize == 0)
|
||||
return flag;
|
||||
|
||||
/* Note: BITSIZE should always be <= ADDRSIZE, but in case it's not,
|
||||
we'll be permissive: extra bits in the field mask will
|
||||
automatically extend the address mask for purposes of the
|
||||
|
Loading…
Reference in New Issue
Block a user