26 lines
1.2 KiB
Diff
26 lines
1.2 KiB
Diff
diff -rupN binutils-2.30/bfd/coffgen.c binutils-2.30-new/bfd/coffgen.c
|
|
--- binutils-2.30/bfd/coffgen.c 2018-01-13 14:31:15.000000000 +0100
|
|
+++ binutils-2.30-new/bfd/coffgen.c 2018-08-09 00:21:08.766188957 +0200
|
|
@@ -1547,7 +1547,9 @@ coff_pointerize_aux (bfd *abfd,
|
|
|
|
if ((ISFCN (type) || ISTAG (n_sclass) || n_sclass == C_BLOCK
|
|
|| n_sclass == C_FCN)
|
|
- && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l > 0)
|
|
+ && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l > 0
|
|
+ && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l
|
|
+ < (long) obj_raw_syment_count (abfd))
|
|
{
|
|
auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p =
|
|
table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l;
|
|
@@ -1555,7 +1557,9 @@ coff_pointerize_aux (bfd *abfd,
|
|
}
|
|
/* A negative tagndx is meaningless, but the SCO 3.2v4 cc can
|
|
generate one, so we must be careful to ignore it. */
|
|
- if (auxent->u.auxent.x_sym.x_tagndx.l > 0)
|
|
+ if (auxent->u.auxent.x_sym.x_tagndx.l > 0
|
|
+ && auxent->u.auxent.x_sym.x_tagndx.l
|
|
+ < (long) obj_raw_syment_count (abfd))
|
|
{
|
|
auxent->u.auxent.x_sym.x_tagndx.p =
|
|
table_base + auxent->u.auxent.x_sym.x_tagndx.l;
|