mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
GH-161: fix segfault in &default type checking for sets
Fixes GH-161
This commit is contained in:
parent
02783692d8
commit
cada0d5e6e
5 changed files with 12 additions and 1 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
|||
|
||||
2.6-67 | 2019-01-14 14:01:00 -0600
|
||||
|
||||
* GH-161: fix segfault in &default type checking for sets (Jon Siwek, Corelight)
|
||||
|
||||
2.6-66 | 2019-01-14 10:26:47 -0600
|
||||
|
||||
* Fix performance issue due to variable reuse in table expiration (Justin Azoff, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.6-66
|
||||
2.6-67
|
||||
|
|
|
@ -292,6 +292,7 @@ void Attributes::CheckAttr(Attr* a)
|
|||
}
|
||||
|
||||
a->AttrExpr()->Error("&default value has inconsistent type", type);
|
||||
return;
|
||||
}
|
||||
|
||||
TableType* tt = type->AsTableType();
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
error in /home/jon/pro/zeek/zeek/testing/btest/.tmp/language.attr-default-global-set-error/attr-default-global-set-error.bro, line 4: arithmetic mixed with non-arithmetic (set[string] and 0)
|
||||
error in /home/jon/pro/zeek/zeek/testing/btest/.tmp/language.attr-default-global-set-error/attr-default-global-set-error.bro, line 4: &default value has inconsistent type (0 and set[string])
|
4
testing/btest/language/attr-default-global-set-error.bro
Normal file
4
testing/btest/language/attr-default-global-set-error.bro
Normal file
|
@ -0,0 +1,4 @@
|
|||
# @TEST-EXEC-FAIL: bro -b %INPUT >out 2>&1
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
|
||||
|
||||
global ss: set[string] &default=0;
|
Loading…
Add table
Add a link
Reference in a new issue