mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
asan: buffer overflow in sh_reloc
* coff-sh.c (sh_reloc): Use bfd_reloc_offset_in_range.
This commit is contained in:
@ -597,7 +597,8 @@ sh_reloc (bfd * abfd,
|
|||||||
&& bfd_is_und_section (symbol_in->section))
|
&& bfd_is_und_section (symbol_in->section))
|
||||||
return bfd_reloc_undefined;
|
return bfd_reloc_undefined;
|
||||||
|
|
||||||
if (addr > input_section->size)
|
if (!bfd_reloc_offset_in_range (reloc_entry->howto, abfd, input_section,
|
||||||
|
addr))
|
||||||
return bfd_reloc_outofrange;
|
return bfd_reloc_outofrange;
|
||||||
|
|
||||||
sym_value = get_symbol_value (symbol_in);
|
sym_value = get_symbol_value (symbol_in);
|
||||||
|
Reference in New Issue
Block a user