+2016-08-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * readelf.c (load_specific_debug_section): Check the external
+ compression header size.
+
2016-08-19 Nick Clifton <nickc@redhat.com>
* testsuite/binutils-all/readelf.s: Adjust expected ordering of
off the end of the section when populating the directory table and
file table.
(frame_display_row): Set max_regs equal to ncols.
- (load_specific_debug_section): If the section is compressed, but
- it is not big enough to hold a compression header then warn and
- return 0.
+ * readelf.c (load_specific_debug_section): If the section is
+ compressed, but it is not big enough to hold a compression
+ header then warn and return 0.
PR binutils/20439
* dwarf.c (display_debug_lines_decoded): Check directory and file
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);