mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
Fix invalid memory access in the BFD library's DWARF parser.
PR binutils/21151 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid unit length field.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2017-02-13 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR binutils/21151
|
||||||
|
* dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
|
||||||
|
unit length field.
|
||||||
|
|
||||||
2017-02-07 Andrew Waterman <andrew@sifive.com>
|
2017-02-07 Andrew Waterman <andrew@sifive.com>
|
||||||
|
|
||||||
* elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
|
* elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
|
||||||
|
@ -4294,6 +4294,10 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
|
|||||||
{
|
{
|
||||||
bfd_byte * new_ptr;
|
bfd_byte * new_ptr;
|
||||||
|
|
||||||
|
/* PR 21151 */
|
||||||
|
if (stash->info_ptr + length > stash->info_ptr_end)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
each = parse_comp_unit (stash, length, info_ptr_unit,
|
each = parse_comp_unit (stash, length, info_ptr_unit,
|
||||||
offset_size);
|
offset_size);
|
||||||
if (!each)
|
if (!each)
|
||||||
|
Reference in New Issue
Block a user