diff options
author | Alan Modra <amodra@gmail.com> | 2019-07-20 10:47:20 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-07-20 10:55:16 +0930 |
commit | 9ab3a74416dac187d56fcf292b39b681d1362dae (patch) | |
tree | 20e5bf18bbfd27514615b323830afacb902c43e6 /ld/ldlex.l | |
parent | bcbaec5c407a9301ed987d380ac49426a84c3a0e (diff) | |
download | gdb-9ab3a74416dac187d56fcf292b39b681d1362dae.zip gdb-9ab3a74416dac187d56fcf292b39b681d1362dae.tar.gz gdb-9ab3a74416dac187d56fcf292b39b681d1362dae.tar.bz2 |
PR24827, Linker loops forever if unterminated multi-line comment in script
YY_INPUT returns 0 on end of input, not EOF.
PR 24827
* ldlex.l (comment): Check for 0 return from input(), not EOF.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r-- | ld/ldlex.l | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -675,7 +675,7 @@ comment (void) while (1) { c = input(); - while (c != '*' && c != EOF) + while (c != '*' && c != 0) { if (c == '\n') lineno++; @@ -694,7 +694,7 @@ comment (void) if (c == '\n') lineno++; - if (c == EOF) + if (c == 0) { einfo (_("%F%P: EOF in comment\n")); break; |