projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9479dc
)
Fix a seg-fault in the ELF note parser when a note with an excessively large alignmen...
author
Nick Clifton
<nickc@redhat.com>
Thu, 8 Feb 2018 10:28:25 +0000
(10:28 +0000)
committer
Nick Clifton
<nickc@redhat.com>
Thu, 8 Feb 2018 10:28:25 +0000
(10:28 +0000)
PR 22788
* elf.c (elf_parse_notes): Reject notes with excessuively large
alignments.
bfd/ChangeLog
patch
|
blob
|
history
bfd/elf.c
patch
|
blob
|
history
diff --git
a/bfd/ChangeLog
b/bfd/ChangeLog
index 6dd9f4713ba5d1765008ef48f948dddd92518979..7462f914c6ce5726a2965abf45812289c3a50c4f 100644
(file)
--- a/
bfd/ChangeLog
+++ b/
bfd/ChangeLog
@@
-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>
Revert 2018-01-17 Alan Modra <amodra@gmail.com>
diff --git
a/bfd/elf.c
b/bfd/elf.c
index dedf35feb3c468d020025b3528a2c6544107db04..db1e076b554a83be5db6234c11e89d26805fb527 100644
(file)
--- a/
bfd/elf.c
+++ b/
bfd/elf.c
@@
-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)