detect/http_start: check if 'line' is valid

In certain conditions like low memory the line can be NULL.

Bug #2307.
pull/3037/head
Victor Julien 7 years ago
parent 9abac08cc7
commit a1f8cf40e2

@ -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;

Loading…
Cancel
Save