From 934a9fcc02baf12da0c3fd679a1c71e5f553a728 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Thu, 5 Oct 2017 13:28:28 +0000 Subject: [PATCH] Verify if chunk exists before access it --- apache2/apache2_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache2/apache2_io.c b/apache2/apache2_io.c index 3f5b4ba9..9ab59a53 100644 --- a/apache2/apache2_io.c +++ b/apache2/apache2_io.c @@ -85,7 +85,7 @@ apr_status_t input_filter(ap_filter_t *f, apr_bucket_brigade *bb_out, return APR_EGENERAL; } - if (chunk->length > 0) { + if (chunk && chunk->length > 0) { if (chunk && (!msr->txcfg->stream_inbody_inspection || (msr->txcfg->stream_inbody_inspection && msr->if_stream_changed == 0))) { /* Copy the data we received in the chunk */ bucket = apr_bucket_heap_create(chunk->data, chunk->length, NULL,