diff options
author | Archie Cobbs <archie@FreeBSD.org> | 2001-01-07 00:26:32 +0000 |
---|---|---|
committer | Archie Cobbs <archie@FreeBSD.org> | 2001-01-07 00:26:32 +0000 |
commit | dceab8ea63dd81195030da0cb21c3b743ca2f34a (patch) | |
tree | fc4d423780a1ea696eb26abd7238ddfa7959fdac /contrib/libpcap/scanner.l | |
parent | ad4032fe0903e9eec994da39c67a0bcf67cfd92f (diff) | |
download | src-dceab8ea63dd81195030da0cb21c3b743ca2f34a.tar.gz src-dceab8ea63dd81195030da0cb21c3b743ca2f34a.zip |
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
Notes
Notes:
svn path=/head/; revision=70735
Diffstat (limited to 'contrib/libpcap/scanner.l')
-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 54141499e01d..c90d2a8cbc60 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); } /* |