PR23804, buffer overflow in sec_merge_hash_lookup
PR 23804 * merge.c (_bfd_add_merge_section): Don't attempt to merge sections where size is not a multiple of entsize.
This commit is contained in:
parent
8e3152af14
commit
ab419ddbb2
@ -1,3 +1,9 @@
|
|||||||
|
2018-10-23 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 23804
|
||||||
|
* merge.c (_bfd_add_merge_section): Don't attempt to merge
|
||||||
|
sections where size is not a multiple of entsize.
|
||||||
|
|
||||||
2018-10-20 Alan Modra <amodra@gmail.com>
|
2018-10-20 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 23788
|
PR 23788
|
||||||
|
@ -376,6 +376,9 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec,
|
|||||||
|| sec->entsize == 0)
|
|| sec->entsize == 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
if (sec->size % sec->entsize != 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
if ((sec->flags & SEC_RELOC) != 0)
|
if ((sec->flags & SEC_RELOC) != 0)
|
||||||
{
|
{
|
||||||
/* We aren't prepared to handle relocations in merged sections. */
|
/* We aren't prepared to handle relocations in merged sections. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user