]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/dce.stub_data: update buffer initialization logic
authorVictor Julien <vjulien@oisf.net>
Sat, 28 Jan 2023 09:09:30 +0000 (10:09 +0100)
committerVictor Julien <vjulien@oisf.net>
Sat, 28 Jan 2023 11:46:41 +0000 (12:46 +0100)
src/detect-dce-stub-data.c

index 6a4f540885977c992059721cb6ce06406c9de075..a05d91d27170e3aad26766552d56b0409108b6f2 100644 (file)
@@ -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;