From: Victor Julien Date: Sat, 28 Jan 2023 09:09:30 +0000 (+0100) Subject: detect/dce.stub_data: update buffer initialization logic X-Git-Tag: suricata-7.0.0-rc1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6fd1b017fdb051ecbb028971648e990d3295c2c;p=thirdparty%2Fsuricata.git detect/dce.stub_data: update buffer initialization logic --- diff --git a/src/detect-dce-stub-data.c b/src/detect-dce-stub-data.c index 6a4f540885..a05d91d271 100644 --- a/src/detect-dce-stub-data.c +++ b/src/detect-dce-stub-data.c @@ -72,7 +72,7 @@ static InspectionBuffer *GetSMBData(DetectEngineThreadCtx *det_ctx, void *txv, const int list_id) { InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); - if (buffer->inspect == NULL) { + if (!buffer->initialized) { uint32_t data_len = 0; const uint8_t *data = NULL; uint8_t dir = flow_flags & (STREAM_TOSERVER|STREAM_TOCLIENT); @@ -92,7 +92,7 @@ static InspectionBuffer *GetDCEData(DetectEngineThreadCtx *det_ctx, void *txv, const int list_id) { InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); - if (buffer->inspect == NULL) { + if (!buffer->initialized) { uint32_t data_len = 0; const uint8_t *data = NULL; uint8_t endianness;