mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-03 19:36:46 +08:00
Fix a seg-fault in the ELF note parser when a note with an excessively large alignment is encountered.
PR 22788 * elf.c (elf_parse_notes): Reject notes with excessuively large alignments.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2018-02-08 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 22788
|
||||||
|
* elf.c (elf_parse_notes): Reject notes with excessuively large
|
||||||
|
alignments.
|
||||||
|
|
||||||
2018-02-07 Alan Modra <amodra@gmail.com>
|
2018-02-07 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
Revert 2018-01-17 Alan Modra <amodra@gmail.com>
|
Revert 2018-01-17 Alan Modra <amodra@gmail.com>
|
||||||
|
@ -11012,6 +11012,8 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset,
|
|||||||
align is less than 4, we use 4 byte alignment. */
|
align is less than 4, we use 4 byte alignment. */
|
||||||
if (align < 4)
|
if (align < 4)
|
||||||
align = 4;
|
align = 4;
|
||||||
|
if (align != 4 && align != 8)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
p = buf;
|
p = buf;
|
||||||
while (p < buf + size)
|
while (p < buf + size)
|
||||||
|
Reference in New Issue
Block a user