gcc.c (validate_switches): Robustify against skipping past '\0'.
2002-12-18 Loren James Rittle <rittle@labs.mot.com> * gcc.c (validate_switches): Robustify against skipping past '\0'. From-SVN: r60283
This commit is contained in:
parent
064b6c700a
commit
5a0ba8c9ee
2 changed files with 10 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2002-12-18 Loren James Rittle <rittle@labs.mot.com>
|
||||||
|
|
||||||
|
* gcc.c (validate_switches): Robustify against skipping past '\0'.
|
||||||
|
|
||||||
2002-12-18 Geoffrey Keating <geoffk@apple.com>
|
2002-12-18 Geoffrey Keating <geoffk@apple.com>
|
||||||
|
|
||||||
* config.gcc: Set extra_objs in the generic Darwin rule,
|
* config.gcc: Set extra_objs in the generic Darwin rule,
|
||||||
|
|
12
gcc/gcc.c
12
gcc/gcc.c
|
@ -6808,11 +6808,11 @@ next_member:
|
||||||
switches[i].validated = 1;
|
switches[i].validated = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
p++;
|
if (*p) p++;
|
||||||
if (p[-1] == '|' || p[-1] == '&')
|
if (*p && (p[-1] == '|' || p[-1] == '&'))
|
||||||
goto next_member;
|
goto next_member;
|
||||||
|
|
||||||
if (p[-1] == ':')
|
if (*p && p[-1] == ':')
|
||||||
{
|
{
|
||||||
while (*p && *p != ';' && *p != '}')
|
while (*p && *p != ';' && *p != '}')
|
||||||
{
|
{
|
||||||
|
@ -6824,11 +6824,11 @@ next_member:
|
||||||
else if (p[0] == 'W' && p[1] == '{')
|
else if (p[0] == 'W' && p[1] == '{')
|
||||||
p = validate_switches (p+2);
|
p = validate_switches (p+2);
|
||||||
}
|
}
|
||||||
p++;
|
if (*p) p++;
|
||||||
}
|
}
|
||||||
|
|
||||||
p++;
|
if (*p) p++;
|
||||||
if (p[-1] == ';')
|
if (*p && p[-1] == ';')
|
||||||
goto next_member;
|
goto next_member;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue