diff options
author | Nick Clifton <nickc@redhat.com> | 2018-02-08 10:28:25 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-02-08 10:28:25 +0000 |
commit | ef135d4314fd4c2d7da66b9d7b59af4a85b0f7e6 (patch) | |
tree | a2773089464d8c0792dfa2fc4e3e88fc69907e20 /bfd/elf.c | |
parent | a9479dc051ab00f311c04cdd5b299a70739f67ed (diff) | |
download | fsf-binutils-gdb-ef135d4314fd4c2d7da66b9d7b59af4a85b0f7e6.zip fsf-binutils-gdb-ef135d4314fd4c2d7da66b9d7b59af4a85b0f7e6.tar.gz fsf-binutils-gdb-ef135d4314fd4c2d7da66b9d7b59af4a85b0f7e6.tar.bz2 |
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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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. */ if (align < 4) align = 4; + if (align != 4 && align != 8) + return FALSE; p = buf; while (p < buf + size) |