]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4245: detection: update debug logs to avoid use invalid packet
authorYehor Velykozhon -X (yvelykoz - SOFTSERVE INC at Cisco) <yvelykoz@cisco.com>
Fri, 15 Mar 2024 16:40:34 +0000 (16:40 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Fri, 15 Mar 2024 16:40:34 +0000 (16:40 +0000)
Merge in SNORT/snort3 from ~YVELYKOZ/snort3:sse_debug_fix to master

Squashed commit of the following:

commit 2146df95cc4fdeef0bfc0ca3d5aea5559ad7a706
Author: Yehor Velykozhon <yvelykoz@cisco.com>
Date:   Fri Mar 15 17:02:31 2024 +0200

    detection: use correct packet in trace logs

src/detection/detection_continuation.h

index 1df6d268753f75d16303ecb84ac7ce014cfb6586..60d9ee9e7728647afca05a13bd378c83de00000d 100644 (file)
@@ -224,13 +224,13 @@ bool Continuation::State::eval(snort::Packet& p)
     if (cursor.awaiting_data(true) or cursor.size() == 0)
     {
         waypoint = cursor.get_next_pos();
-        debug_logf(detection_trace, TRACE_CONT, data.p,
+        debug_logf(detection_trace, TRACE_CONT, &p,
             "Continuation postponed, %u bytes to go\n", waypoint);
         return false;
     }
 
     assert(cursor.get_name());
-    debug_logf(detection_trace, TRACE_CONT, data.p,
+    debug_logf(detection_trace, TRACE_CONT, &p,
         "Cursor reached the position, evaluating sub-tree with "
         "current buffer '%s'\n", cursor.get_name());