diff mbox

Prevent out of bound access for multilib_options

Message ID 1397068915.25862.YahooMailNeo@web87901.mail.ir2.yahoo.com
State New
Headers show

Commit Message

Graham Stott April 9, 2014, 6:41 p.m. UTC
All,

It happens with all mulitilib configurations not just arm-elf

if we have reached the end of the multilib_options string there are

no more options to process  so break from the loop.

This patch is an alternative fix.
============================



Graham
diff mbox

Patch

=================================
Index: gcc.c
============================
--- gcc.c    (revision 209248)
+++ gcc.c    (working copy)
@@ -7531,6 +7531,9 @@ 
             }
           break;
         }
+
+          if (*q == '\0')
+        break;
         }
     }
     }