From da7f1d22ccfe1353fb1dd6966bf209e8b1524754 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 1 Nov 2012 15:26:47 +0100 Subject: [PATCH] http: don't assume http tx to have header alloc'd. Can happen in OOM conditions. Bug #587. --- src/detect-engine-hhd.c | 2 ++ 1 file changed, 2 insertions(+) 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];