From b25bd2e18031761ff2a5b47f5cd6cff5c7d9449e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 18 Feb 2016 20:58:09 +0100 Subject: [PATCH] http: fix NULL deref on certain out of memory conditions --- src/app-layer-htp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index caf2ea5307..9425525fe7 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -2127,7 +2127,7 @@ static int HTPCallbackDoubleDecodePath(htp_tx_t *tx) static int HTPCallbackRequestHeaderData(htp_tx_data_t *tx_data) { void *ptmp; - if (tx_data->len == 0) + if (tx_data->len == 0 || tx_data->tx == NULL) return HTP_OK; HtpTxUserData *tx_ud = htp_tx_get_user_data(tx_data->tx); @@ -2164,7 +2164,7 @@ static int HTPCallbackRequestHeaderData(htp_tx_data_t *tx_data) static int HTPCallbackResponseHeaderData(htp_tx_data_t *tx_data) { void *ptmp; - if (tx_data->len == 0) + if (tx_data->len == 0 || tx_data->tx == NULL) return HTP_OK; HtpTxUserData *tx_ud = htp_tx_get_user_data(tx_data->tx);