]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: improve explanation of offset tracking
authorVictor Julien <vjulien@oisf.net>
Thu, 12 Oct 2023 13:31:35 +0000 (15:31 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 1 Dec 2023 13:55:42 +0000 (14:55 +0100)
src/detect.h

index cdc098368fc4ceb91293f6a4ee9912e8badea572..e30bac279a06c8cbcc7df90fd80acb3755f9cc0a 100644 (file)
@@ -1103,10 +1103,11 @@ typedef struct DetectEngineThreadCtx_ {
 
     uint64_t raw_stream_progress;
 
-    /** offset into the payload of the last match by:
-     *  content, pcre, etc */
+    /** offset into the payload of the end of the last match by: content, pcre, etc */
     uint32_t buffer_offset;
-    /* used by pcre match function alone */
+
+    /** used by pcre match function alone: normally in sync with buffer_offset, but
+     *  points to 1 byte after the start of the last pcre match if a pcre match happened. */
     uint32_t pcre_match_start_offset;
 
     /* counter for the filestore array below -- up here for cache reasons. */