This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Prevent out of bound access for multilib_options


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



Graham


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]