]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
inspect: debug validation to ensure correct argument
authorPhilippe Antoine <contact@catenacyber.fr>
Mon, 13 Sep 2021 10:27:51 +0000 (12:27 +0200)
committerVictor Julien <vjulien@oisf.net>
Fri, 12 Nov 2021 14:21:07 +0000 (15:21 +0100)
src/detect-engine.c

index f76e3e22a30605c42e51a3b025e7e99b81239a45..a61d1416958b6d5ee5a87577607e7e66ba5cafad 100644 (file)
@@ -1093,6 +1093,7 @@ void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id,
 {
 #ifdef DEBUG_VALIDATION
     DEBUG_VALIDATE_BUG_ON(buffer->multi);
+    DEBUG_VALIDATE_BUG_ON(buffer != InspectionBufferGet(det_ctx, list_id));
 #endif
     if (buffer->inspect == NULL) {
 #ifdef UNITTESTS