From: Victor Julien Date: Fri, 1 Dec 2017 08:23:29 +0000 (+0100) Subject: detect/http_start: check if 'line' is valid X-Git-Tag: suricata-4.1.0-beta1~521 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1f8cf40e233fdf7a604ad6f4b28cc489324aecb;p=thirdparty%2Fsuricata.git detect/http_start: check if 'line' is valid In certain conditions like low memory the line can be NULL. Bug #2307. --- 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;