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:
6b526f6
)
readelf: avoid a possible divide by zero
author
Alan Modra
<amodra@gmail.com>
Sun, 19 Dec 2021 01:48:50 +0000
(12:18 +1030)
committer
Alan Modra
<amodra@gmail.com>
Sun, 19 Dec 2021 01:54:16 +0000
(12:24 +1030)
* readelf.c (process_section_headers): Check SHT_RELR entsize.
binutils/readelf.c
patch
|
blob
|
history
diff --git
a/binutils/readelf.c
b/binutils/readelf.c
index 2225b7d9046691e42e6c53305bf0260c36b8fb9e..990b7597dd370af639b3fb89fac2b22e901f9a0f 100644
(file)
--- a/
binutils/readelf.c
+++ b/
binutils/readelf.c
@@
-7093,6
+7093,10
@@
process_section_headers (Filedata * filedata)
warn (_("Section '%s': zero-sized relocation section\n"), name);
break;
+ case SHT_RELR:
+ CHECK_ENTSIZE (section, i, Relr);
+ break;
+
case SHT_NOTE:
case SHT_PROGBITS:
/* Having a zero sized section is not illegal according to the