mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
GH-162: fix segfault when &expire_func is missing a return value
Fixes GH-162
This commit is contained in:
parent
cada0d5e6e
commit
399660c9eb
3 changed files with 12 additions and 5 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
2.6-68 | 2019-01-14 14:18:46 -0600
|
||||||
|
|
||||||
|
* GH-162: fix segfault when &expire_func is missing a return value (Jon Siwek, Corelight)
|
||||||
|
|
||||||
2.6-67 | 2019-01-14 14:01:00 -0600
|
2.6-67 | 2019-01-14 14:01:00 -0600
|
||||||
|
|
||||||
* GH-161: fix segfault in &default type checking for sets (Jon Siwek, Corelight)
|
* GH-161: fix segfault in &default type checking for sets (Jon Siwek, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.6-67
|
2.6-68
|
||||||
|
|
11
src/Val.cc
11
src/Val.cc
|
@ -2466,7 +2466,7 @@ double TableVal::CallExpireFunc(Val* idx)
|
||||||
|
|
||||||
vl->append(idx);
|
vl->append(idx);
|
||||||
|
|
||||||
double secs;
|
double secs = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2488,16 +2488,19 @@ double TableVal::CallExpireFunc(Val* idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
Val* vs = vf->AsFunc()->Call(vl);
|
Val* vs = vf->AsFunc()->Call(vl);
|
||||||
secs = vs->AsInterval();
|
|
||||||
|
if ( vs )
|
||||||
|
{
|
||||||
|
secs = vs->AsInterval();
|
||||||
|
Unref(vs);
|
||||||
|
}
|
||||||
|
|
||||||
Unref(vf);
|
Unref(vf);
|
||||||
Unref(vs);
|
|
||||||
delete vl;
|
delete vl;
|
||||||
}
|
}
|
||||||
|
|
||||||
catch ( InterpreterException& e )
|
catch ( InterpreterException& e )
|
||||||
{
|
{
|
||||||
secs = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return secs;
|
return secs;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue