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/rtl.c | |
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/rtl.c')
-rw-r--r-- | gcc/rtl.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |