Re: [PATCH] readelf: Check there are at least 4 bytes available for DWARF_FORM_block4.

2018-06-16 Thread Mark Wielaard
On Thu, 2018-06-14 at 01:24 +0200, Mark Wielaard wrote: > Found by afl-fuzz. When printing a DWARF_FORM_block4 we checked there > were only 2 bytes available (copy/paste from DW_FORM_block2 right > before). Obviously we need at least 4 bytes to read the length of a > DW_FORM_block4. Pushed to mast

[PATCH] readelf: Check there are at least 4 bytes available for DWARF_FORM_block4.

2018-06-13 Thread Mark Wielaard
Found by afl-fuzz. When printing a DWARF_FORM_block4 we checked there were only 2 bytes available (copy/paste from DW_FORM_block2 right before). Obviously we need at least 4 bytes to read the length of a DW_FORM_block4. Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/readelf.c | 2