diff options
author | Alan Modra <amodra@gmail.com> | 2023-03-25 09:43:40 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-03-27 21:58:46 +1030 |
commit | 58c4c6a0bf29525a029d64a6446ac5d9e0c45a4a (patch) | |
tree | 77ed3c2d2b7f4e9e694ddbe920ca02232d60ac06 /bfd | |
parent | eb42b9d6f914b233d740da88d5e21c6690170b7d (diff) | |
download | gdb-58c4c6a0bf29525a029d64a6446ac5d9e0c45a4a.zip gdb-58c4c6a0bf29525a029d64a6446ac5d9e0c45a4a.tar.gz gdb-58c4c6a0bf29525a029d64a6446ac5d9e0c45a4a.tar.bz2 |
XCOFF sanity check
* coffcode.h (coff_pointerize_aux_hook): Sanity check
x_csect.x_scnlen against raw_syment_count.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/coffcode.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 7a4c409..bf55d83 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -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; |