From: Victor Julien Date: Mon, 17 Apr 2023 18:05:04 +0000 (+0200) Subject: detect/http2.header_name: fix multi buffer setup X-Git-Tag: suricata-7.0.0-rc2~378 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54f34dea5c40040bbc290722524ae886e16b5f05;p=thirdparty%2Fsuricata.git detect/http2.header_name: fix multi buffer setup --- diff --git a/src/detect-http2.c b/src/detect-http2.c index 69e79dfc93..7b9395710f 100644 --- a/src/detect-http2.c +++ b/src/detect-http2.c @@ -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"); }