From: Victor Julien Date: Thu, 18 Feb 2016 19:58:09 +0000 (+0100) Subject: http: fix NULL deref on certain out of memory conditions X-Git-Tag: suricata-3.0.1RC1~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b25bd2e18031761ff2a5b47f5cd6cff5c7d9449e;p=thirdparty%2Fsuricata.git http: fix NULL deref on certain out of memory conditions --- 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);