]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect/state: fix reset bug
authorVictor Julien <victor@inliniac.net>
Sun, 28 Feb 2021 08:39:16 +0000 (09:39 +0100)
committerVictor Julien <victor@inliniac.net>
Sun, 28 Feb 2021 17:13:04 +0000 (18:13 +0100)
commite96464308819afb44d3b95d97f10ab84b6e0e979
treeac8d49d3b571867124a8cddab68bcb9aa94e8707
parentf766139159ad8c530a87047224644757074cf145
detect/state: fix reset bug

Fix issue where after a reset the now empty list elements are not
reused and the values may not be valid for the current detect
engine anymore.

Introduce a 'current' (cur) pointer that points to the store element
currently being filled. This way existing stores will be reused.

If 'cur' is NULL and 'head' is not NULL it means we need to use
'tail' to append a new store.
src/detect-engine-state.c
src/detect-engine-state.h