mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
readelf: avoid a possible divide by zero
* readelf.c (process_section_headers): Check SHT_RELR entsize.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user