From 9c34e82471c6bbed9e63cd1645cea1c764a568d8 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 28 Jan 2023 10:10:54 +0100 Subject: [PATCH] detect/http.uri: update buffer initialization logic --- src/detect-http-uri.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/detect-http-uri.c b/src/detect-http-uri.c index 3f60b1837c..09aa55e7f4 100644 --- a/src/detect-http-uri.c +++ b/src/detect-http-uri.c @@ -224,7 +224,7 @@ static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, SCEnter(); InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); - if (buffer->inspect == NULL) { + if (!buffer->initialized) { htp_tx_t *tx = (htp_tx_t *)txv; HtpTxUserData *tx_ud = htp_tx_get_user_data(tx); @@ -250,7 +250,7 @@ static InspectionBuffer *GetData2(DetectEngineThreadCtx *det_ctx, SCEnter(); InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); - if (buffer->inspect == NULL) { + if (!buffer->initialized) { uint32_t b_len = 0; const uint8_t *b = NULL; @@ -319,7 +319,7 @@ static InspectionBuffer *GetRawData(DetectEngineThreadCtx *det_ctx, SCEnter(); InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); - if (buffer->inspect == NULL) { + if (!buffer->initialized) { htp_tx_t *tx = (htp_tx_t *)txv; if (unlikely(tx->request_uri == NULL)) { return NULL;