From 433f32043319f3ce511e43c22f424429769c76e0 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 1 Dec 2017 09:23:29 +0100 Subject: [PATCH] detect/http_start: check if 'line' is valid In certain conditions like low memory the line can be NULL. Bug #2307. --- src/detect-http-start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detect-http-start.c b/src/detect-http-start.c index 2d587dc228..914ecca4cd 100644 --- a/src/detect-http-start.c +++ b/src/detect-http-start.c @@ -109,7 +109,7 @@ static uint8_t *GetBufferForTX(htp_tx_t *tx, uint64_t tx_id, headers = tx->response_headers; line = tx->response_line; } - if (headers == NULL) + if (line == NULL || headers == NULL) return NULL; size_t line_size = bstr_len(line) + 2; -- 2.47.2