Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   rillig
Date:           Tue May 31 00:35:18 UTC 2022

Modified Files:
        src/tests/usr.bin/xlint/lint1: d_gcc_compound_statements1.c
            d_gcc_compound_statements1.exp msg_249.c msg_249.exp
        src/usr.bin/xlint/lint1: decl.c

Log Message:
lint: fix null pointer dereference after syntax error

Found by afl, starting with the malformed input '/**/f=({;/**/};}' that
no longer crashes.  This input led to 'f=({L:;}', which is at least a
syntactically valid prefix of a translation unit, containing a GCC
statement expression with an unused label.  The error message for this
unused label assumed that it would always be inside a function
definition.

While here, document incomplete recovery after syntax errors, in
msg_249.c.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
    src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c \
    src/tests/usr.bin/xlint/lint1/msg_249.c
cvs rdiff -u -r1.4 -r1.5 \
    src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.exp
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_249.exp
cvs rdiff -u -r1.282 -r1.283 src/usr.bin/xlint/lint1/decl.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