mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
Fix a potential illegal memory access in the BFD library when parsing a corrupt DWARF file.
PR 29988 * dwarf2.c (read_indexed_address): Fix check for an out of range offset.
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
2023-01-11 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 29988
|
||||
* dwarf2.c (read_indexed_address): Fix check for an out of range
|
||||
offset.
|
||||
|
||||
2023-01-06 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/ru.po: Updated Russian translation.
|
||||
|
@ -1420,7 +1420,7 @@ read_indexed_address (uint64_t idx, struct comp_unit *unit)
|
||||
offset += unit->dwarf_addr_offset;
|
||||
if (offset < unit->dwarf_addr_offset
|
||||
|| offset > file->dwarf_addr_size
|
||||
|| file->dwarf_addr_size - offset < unit->offset_size)
|
||||
|| file->dwarf_addr_size - offset < unit->addr_size)
|
||||
return 0;
|
||||
|
||||
info_ptr = file->dwarf_addr_buffer + offset;
|
||||
|
Reference in New Issue
Block a user