]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/http2.header_name: fix multi buffer setup
authorVictor Julien <vjulien@oisf.net>
Mon, 17 Apr 2023 18:05:04 +0000 (20:05 +0200)
committerVictor Julien <vjulien@oisf.net>
Thu, 20 Apr 2023 17:04:25 +0000 (19:04 +0200)
src/detect-http2.c

index 69e79dfc9379bf7d0b508a0dd0e070ff6c24dd05..7b9395710f9e7e441b88160caa0c840f7564e219 100644 (file)
@@ -688,13 +688,16 @@ static InspectionBuffer *GetHttp2HNameData(DetectEngineThreadCtx *det_ctx, const
     uint32_t b_len = 0;
     const uint8_t *b = NULL;
 
-    if (rs_http2_tx_get_header_name(cbdata->txv, flags, cbdata->local_id, &b, &b_len) != 1)
+    if (rs_http2_tx_get_header_name(cbdata->txv, flags, cbdata->local_id, &b, &b_len) != 1) {
+        InspectionBufferSetupMultiEmpty(buffer);
         return NULL;
-    if (b == NULL || b_len == 0)
+    }
+    if (b == NULL || b_len == 0) {
+        InspectionBufferSetupMultiEmpty(buffer);
         return NULL;
+    }
 
-    InspectionBufferSetup(det_ctx, list_id, buffer, b, b_len);
-    InspectionBufferApplyTransforms(buffer, transforms);
+    InspectionBufferSetupMulti(buffer, transforms, b, b_len);
 
     SCReturnPtr(buffer, "InspectionBuffer");
 }