]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http: don't assume http tx to have header alloc'd. Can happen in OOM conditions....
authorVictor Julien <victor@inliniac.net>
Thu, 1 Nov 2012 14:26:47 +0000 (15:26 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 1 Nov 2012 14:26:47 +0000 (15:26 +0100)
src/detect-engine-hhd.c

index 2e996e2fed73255bd24ff95ce737083d27ea6545..745e41283e7b959a57b5695fc6ab63f5cb83f48e 100644 (file)
@@ -131,6 +131,8 @@ static uint8_t *DetectEngineHHDGetBufferForTX(int tx_id,
     } else {
         headers = tx->response_headers;
     }
+    if (headers == NULL)
+        goto end;
 
     htp_header_t *h = NULL;
     uint8_t *headers_buffer = det_ctx->hhd_buffers[index];