From: Victor Julien Date: Thu, 1 Nov 2012 14:26:47 +0000 (+0100) Subject: http: don't assume http tx to have header alloc'd. Can happen in OOM conditions.... X-Git-Tag: suricata-1.4beta3~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da7f1d22ccfe1353fb1dd6966bf209e8b1524754;p=thirdparty%2Fsuricata.git http: don't assume http tx to have header alloc'd. Can happen in OOM conditions. Bug #587. --- diff --git a/src/detect-engine-hhd.c b/src/detect-engine-hhd.c index 2e996e2fed..745e41283e 100644 --- a/src/detect-engine-hhd.c +++ b/src/detect-engine-hhd.c @@ -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];