aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/gcc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 99ef2dc..68fc4a7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2014-04-17 Kito Cheng <kito@0xlab.org>
+
+ * gcc.c (used_arg): Prevent out of bound access for multilib_options.
+
2014-04-17 Richard Biener <rguenther@suse.de>
PR middle-end/60849
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 5cb485a..c8ab7d6 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -7490,7 +7490,7 @@ used_arg (const char *p, int len)
{
const char *r;
- for (q = multilib_options; *q != '\0'; q++)
+ for (q = multilib_options; *q != '\0'; *q && q++)
{
while (*q == ' ')
q++;