diff options
author | archie <archie@FreeBSD.org> | 2001-01-07 00:26:32 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 2001-01-07 00:26:32 +0000 |
commit | b1ae8b5a7c97de609e4aaecc29ad435279a5e895 (patch) | |
tree | afa2133d269c4b659a1f346fb9b52bdd85f1e124 /contrib/libpcap | |
parent | bc25a02671067c08c1715ae7ca9473431e40f5b2 (diff) | |
download | FreeBSD-src-b1ae8b5a7c97de609e4aaecc29ad435279a5e895.zip FreeBSD-src-b1ae8b5a7c97de609e4aaecc29ad435279a5e895.tar.gz |
When pcap_compile() detects an error, it longjmp()'s out of the
scanner/parser. FreeBSD recently made 'flex' its default implementation
of 'lex'. One of the incompatibilities of 'flex' vs. 'lex' is that
if you longjmp() out of the scanner, you must call yyrestart()
before doing another scan (as documented in flex(1)). So add an
invocation to yyrestart() in lex_init(). This change should be
backwards compatible with the original 'lex'.
PR: bin/24116
Diffstat (limited to 'contrib/libpcap')
-rw-r--r-- | contrib/libpcap/scanner.l | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/libpcap/scanner.l b/contrib/libpcap/scanner.l index 5414149..c90d2a8 100644 --- a/contrib/libpcap/scanner.l +++ b/contrib/libpcap/scanner.l @@ -273,6 +273,7 @@ lex_init(buf) char *buf; { in_buffer = buf; + yyrestart(NULL); } /* |