mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 10:30:46 +00:00
XCOFF sanity check
* coffcode.h (coff_pointerize_aux_hook): Sanity check x_csect.x_scnlen against raw_syment_count.
This commit is contained in:
@@ -2462,7 +2462,8 @@ coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
&& indaux + 1 == symbol->u.syment.n_numaux)
|
||||
{
|
||||
BFD_ASSERT (! aux->is_sym);
|
||||
if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD)
|
||||
if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD
|
||||
&& (bfd_vma) aux->u.auxent.x_csect.x_scnlen.l < obj_raw_syment_count (abfd))
|
||||
{
|
||||
aux->u.auxent.x_csect.x_scnlen.p =
|
||||
table_base + aux->u.auxent.x_csect.x_scnlen.l;
|
||||
|
||||
Reference in New Issue
Block a user