forked from Imagelibrary/binutils-gdb
Check the external compression header size
Since the internal compression header size can be bigger than the external compression header size, we should check the external compression header size. * readelf.c (load_specific_debug_section): Check the external compression header size.
This commit is contained in:
@@ -12706,7 +12706,9 @@ load_specific_debug_section (enum dwarf_section_display_enum debug,
|
||||
Elf_Internal_Chdr chdr;
|
||||
unsigned int compression_header_size;
|
||||
|
||||
if (size < sizeof chdr)
|
||||
if (size < (is_32bit_elf
|
||||
? sizeof (Elf32_External_Chdr)
|
||||
: sizeof (Elf64_External_Chdr)))
|
||||
{
|
||||
warn (_("compressed section %s is too small to contain a compression header"),
|
||||
section->name);
|
||||
|
||||
Reference in New Issue
Block a user