aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite_dfilter
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2023-11-02 01:31:57 +0000
committerJoão Valverde <j@v6e.pt>2023-11-02 09:42:50 +0000
commit5a4d883f85dfd180d8e2ac993e7c05cf3bdf52af (patch)
treeae969c15d11b508a900273778e6b552c7fd2aca8 /test/suite_dfilter
parente0cafce263f28ec3c99e0a618ac17e2a16cb843d (diff)
dfilter: Fix crash with nested function calls
When the jumps_ptr is NULL a nested function call results in a NULL pointer dereference. We could add a NULL check but removing the jump in commit e85f8d4cf19 was a mitake, because the jump is not always a no-op, so add it back. Fixes e85f8d4cf193721cd95daa15363054cd4d12a0f3.
Diffstat (limited to 'test/suite_dfilter')
-rw-r--r--test/suite_dfilter/group_function.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/suite_dfilter/group_function.py b/test/suite_dfilter/group_function.py
index a64f699636..aad95e604d 100644
--- a/test/suite_dfilter/group_function.py
+++ b/test/suite_dfilter/group_function.py
@@ -100,3 +100,10 @@ class TestFunctionLen:
def test_function_len_5(self, checkDFilterCount):
dfilter = '!len(http.host)'
checkDFilterCount(dfilter, 0)
+
+class TestFunctionNested:
+ trace_file = 'http.pcap'
+
+ def test_function_nested_1(self, checkDFilterCount):
+ dfilter = 'abs(min(tcp.srcport, tcp.dstport)) == 80'
+ checkDFilterCount(dfilter, 1)