[Swan] Who changed parser.l ????
Paul Wouters
paul at nohats.ca
Tue Jan 8 16:51:10 EET 2013
On Tue, 8 Jan 2013, Philippe Vouters wrote:
> Nick problem with his mumin conn is related to this change in parser.l
> causing a premature exit on file statements.
> <<EOF>> {
> /*
> * Who did remove the Openswan 2.6.38 code reproduced below and
> * wrote this block hereafter commented out ?
> */
> /*
> static int once = 0;
> if (once = !once) {
> stacktop->line++;
> } else {
> yyterminate();
> }
> */
> /* From Openswan 2.6.38 */
> if(parser_y_eof()) {
> yyterminate();
> }
>
> }
This change was made by Wes to fix an issue where the parser would crash
if the last line in the file had no EOL.
git blame lib/libipsecconf/parser.l|grep "static int once"
6ca2edb0 lib/libipsecconf/parser.l (Wes Hardaker 2012-12-19
18:58:23 -0800 300) static int once = 0;
commit 6ca2edb045895bbcbf116d19492c43949104956e
Author: Wes Hardaker <opensource at hardakers.net>
Date: Wed Dec 19 18:58:23 2012 -0800
Rewrite the EOF parser to at least warn on an EOF at an EOL
More information about the Swan
mailing list