mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
GH-170: fix segfault triggered by invalid pattern symbols
Fixes GH-170
This commit is contained in:
parent
6eee5ded61
commit
39b1d49fc3
3 changed files with 17 additions and 2 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
2.6-77 | 2019-01-15 14:24:55 -0600
|
||||||
|
|
||||||
|
* GH-170: fix segfault triggered by invalid pattern symbols (Jon Siwek, Corelight)
|
||||||
|
|
||||||
2.6-76 | 2019-01-15 12:12:09 -0600
|
2.6-76 | 2019-01-15 12:12:09 -0600
|
||||||
|
|
||||||
* GH-172: fix broxygen not merging bif and script identifier comments (Jon Siwek, Corelight)
|
* GH-172: fix broxygen not merging bif and script identifier comments (Jon Siwek, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.6-76
|
2.6-77
|
||||||
|
|
|
@ -131,7 +131,18 @@ singleton : singleton '*'
|
||||||
{ $$ = $2; case_insensitive = 0; }
|
{ $$ = $2; case_insensitive = 0; }
|
||||||
|
|
||||||
| TOK_CHAR
|
| TOK_CHAR
|
||||||
{ $$ = new NFA_Machine(new NFA_State($1, rem->EC())); }
|
{
|
||||||
|
auto sym = $1;
|
||||||
|
|
||||||
|
if ( sym < 0 || ( sym >= NUM_SYM && sym != SYM_EPSILON ) )
|
||||||
|
{
|
||||||
|
reporter->Error("bad symbol %d (compiling pattern /%s/)", sym,
|
||||||
|
RE_parse_input);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$$ = new NFA_Machine(new NFA_State(sym, rem->EC()));
|
||||||
|
}
|
||||||
|
|
||||||
| '^'
|
| '^'
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue