diff options
| author | Edmund Grimley Evans <Edmund.Grimley.Evans@gmail.com> | 2015-10-15 19:02:58 +0100 |
|---|---|---|
| committer | Edmund Grimley Evans <Edmund.Grimley.Evans@gmail.com> | 2015-10-15 19:02:58 +0100 |
| commit | 743684fe39a56cdc0409ad6877afae486242ec2c (patch) | |
| tree | ecf4f2f35798e9e750385db85384b3cf12800685 /tccpp.c | |
| parent | c899659d39fe5be2943f01b62164267ee903cc85 (diff) | |
| download | tinycc-743684fe39a56cdc0409ad6877afae486242ec2c.tar.gz tinycc-743684fe39a56cdc0409ad6877afae486242ec2c.tar.bz2 | |
tccpp.c: Avoid infinite loop on: printf '/**' | ./tcc -
Diffstat (limited to 'tccpp.c')
| -rw-r--r-- | tccpp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -587,6 +587,8 @@ ST_FUNC uint8_t *parse_comment(uint8_t *p) file->buf_ptr = p; c = handle_eob(); p = file->buf_ptr; + if (c == CH_EOF) + tcc_error("unexpected end of file in comment"); if (c == '\\') { /* skip '\[\r]\n', otherwise just skip the stray */ while (c == '\\') { |
