]> git.ipfire.org Git - thirdparty/strongswan.git/commit
Don't report current text in parser error messages
authorTobias Brunner <tobias@strongswan.org>
Mon, 10 May 2021 12:55:45 +0000 (14:55 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 11 May 2021 08:08:58 +0000 (10:08 +0200)
commitc13a1c2829175b0e2887b8ac5feb3212277123c1
tree2a8d9d5f5d0fc958f6e96857036b7cf01af5be72
parentcf6a164108f053610181ce7706b2342c41c60068
Don't report current text in parser error messages

The values of `yytext` and `yyleng` might not be properly defined when
the error function is called (in particular if the lexer reached EOF).
While this might just cause non-printable characters in the output, it
could actually lead to a crash depending on where `yytext` points.

Closes strongswan/strongswan#346.
src/libstrongswan/settings/settings_parser.y
src/starter/parser/parser.y