mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-06 11:28:40 +08:00
tccpp.c: Avoid infinite loop on: printf '/**' | ./tcc -
This commit is contained in:
parent
c899659d39
commit
743684fe39
2
tccpp.c
2
tccpp.c
@ -587,6 +587,8 @@ ST_FUNC uint8_t *parse_comment(uint8_t *p)
|
|||||||
file->buf_ptr = p;
|
file->buf_ptr = p;
|
||||||
c = handle_eob();
|
c = handle_eob();
|
||||||
p = file->buf_ptr;
|
p = file->buf_ptr;
|
||||||
|
if (c == CH_EOF)
|
||||||
|
tcc_error("unexpected end of file in comment");
|
||||||
if (c == '\\') {
|
if (c == '\\') {
|
||||||
/* skip '\[\r]\n', otherwise just skip the stray */
|
/* skip '\[\r]\n', otherwise just skip the stray */
|
||||||
while (c == '\\') {
|
while (c == '\\') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user