A series of fixes to addres problems detected by compiling the assembler with address...
[deliverable/binutils-gdb.git] / gas / config / tc-i386.c
index 7159432f1330512b5a8f839e6fc05ed35ae89bf3..08dd9963e1c089dea70d358bdad9b17137d81a0a 100644 (file)
@@ -1299,7 +1299,16 @@ i386_output_nops (char *where, const unsigned char *const *patt,
   /* Place the longer NOP first.  */
   int last;
   int offset;
-  const unsigned char *nops =  patt[max_single_nop_size - 1];
+  const unsigned char *nops;
+
+  if (max_single_nop_size < 1)
+    {
+      as_fatal (_("i386_output_nops called to generate nops of at most %d bytes!"),
+               max_single_nop_size);
+      return;
+    }
+
+  nops = patt[max_single_nop_size - 1];
 
   /* Use the smaller one if the requsted one isn't available.  */
   if (nops == NULL)
This page took 0.023454 seconds and 4 git commands to generate.