mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-30 05:14:18 +08:00
readelf: mask unknown description data bytes.
When printing unknown note types, readelf prints the raw description section byte-by-byte. However, it does not mask appropriately, e.g. it prints the byte 'ba' as 'ffffffba'. * readelf.c (process_note): Mask unknown description data bytes.
This commit is contained in:

committed by
Alan Modra

parent
b1791af06e
commit
178d871928
@ -1,3 +1,7 @@
|
|||||||
|
2019-08-08 Jordan Rupprecht <rupprecht@google.com>
|
||||||
|
|
||||||
|
* readelf.c (process_note): Mask unknown description data bytes.
|
||||||
|
|
||||||
2019-08-08 Alan Modra <amodra@gmail.com>
|
2019-08-08 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* readelf.c (get_data): Improve overflow checks.
|
* readelf.c (get_data): Improve overflow checks.
|
||||||
|
@ -19115,7 +19115,7 @@ process_note (Elf_Internal_Note * pnote,
|
|||||||
|
|
||||||
printf (_(" description data: "));
|
printf (_(" description data: "));
|
||||||
for (i = 0; i < pnote->descsz; i++)
|
for (i = 0; i < pnote->descsz; i++)
|
||||||
printf ("%02x ", pnote->descdata[i]);
|
printf ("%02x ", pnote->descdata[i] & 0xff);
|
||||||
if (!do_wide)
|
if (!do_wide)
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user