diff options
author | Nick Clifton <nickc@cygnus.com> | 1998-04-10 13:41:28 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 1998-04-10 13:41:28 +0000 |
commit | 29cb1e1f173b2e9c4ee6aff74731401a10fae5a7 (patch) | |
tree | 8032f473eb00af80a8c6057c95965809a84e9647 /gcc | |
parent | 3f51802074c07f2471a46128d0ccf404eb48ecf7 (diff) | |
download | gcc-29cb1e1f173b2e9c4ee6aff74731401a10fae5a7.zip gcc-29cb1e1f173b2e9c4ee6aff74731401a10fae5a7.tar.gz gcc-29cb1e1f173b2e9c4ee6aff74731401a10fae5a7.tar.bz2 |
Prevent going into an infinite loop upon encountering an enuterminated comment.
From-SVN: r19082
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/rtl.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b12483a..1314284 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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; |