Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/xlint/lint1



Module Name:    src
Committed By:   rillig
Date:           Sat Jun 19 08:57:25 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: lex.c

Log Message:
lint: fix endless loop when scanning string or character literals

If the code contains an unfinished string or character literal at the
EOF, the lexer got into an endless loop.  Curiously, inpc() returned 0
in such a case instead of the common EOF.

Found by making lint1 with CC=afl-gcc and then running:

afl-fuzz \
    -m 200 \
    -i in_dir \
    -o lint1 \
    $src/usr.bin/xlint/lint1/lint1 @@ /dev/null


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/xlint/lint1/lex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index