Nick Clifton 25d3f6
--- binutils.orig/bfd/coffgen.c	2018-07-11 11:45:09.490030070 +0100
Nick Clifton 25d3f6
+++ binutils-2.29/bfd/coffgen.c	2018-07-11 15:02:48.863331411 +0100
Nick Clifton 25d3f6
@@ -1555,7 +1555,8 @@ coff_pointerize_aux (bfd *abfd,
Nick Clifton 25d3f6
     }
Nick Clifton 25d3f6
   /* A negative tagndx is meaningless, but the SCO 3.2v4 cc can
Nick Clifton 25d3f6
      generate one, so we must be careful to ignore it.  */
Nick Clifton 25d3f6
-  if (auxent->u.auxent.x_sym.x_tagndx.l > 0)
Nick Clifton 25d3f6
+  if ((unsigned long) auxent->u.auxent.x_sym.x_tagndx.l
Nick Clifton 25d3f6
+      < obj_raw_syment_count (abfd))
Nick Clifton 25d3f6
     {
Nick Clifton 25d3f6
       auxent->u.auxent.x_sym.x_tagndx.p =
Nick Clifton 25d3f6
 	table_base + auxent->u.auxent.x_sym.x_tagndx.l;