mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 07:24:32 +08:00
Prevent going into an infinite loop upon encountering an enuterminated comment.
From-SVN: r19082
This commit is contained in:
parent
3f51802074
commit
29cb1e1f17
@ -1,3 +1,8 @@
|
||||
Fri Apr 10 13:40:20 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* rtl.c (read_skip_spaces): Prevent infinite loops upon
|
||||
encountering unterminated comments.
|
||||
|
||||
Fri Apr 10 10:43:41 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* emit-rtl.c (operand_subword): Properly handle CONST_INTs for
|
||||
|
@ -496,7 +496,8 @@ read_skip_spaces (infile)
|
||||
;
|
||||
else if (c == ';')
|
||||
{
|
||||
while ((c = getc (infile)) && c != '\n') ;
|
||||
while ((c = getc (infile)) && c != '\n' && c != EOF)
|
||||
;
|
||||
}
|
||||
else if (c == '/')
|
||||
{
|
||||
@ -506,7 +507,7 @@ read_skip_spaces (infile)
|
||||
dump_and_abort ('*', c, infile);
|
||||
|
||||
prevc = 0;
|
||||
while ((c = getc (infile)))
|
||||
while ((c = getc (infile)) && c != EOF)
|
||||
{
|
||||
if (prevc == '*' && c == '/')
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user