Verify if chunk exists before access it

This commit is contained in:
Felipe Zimmerle 2017-10-05 13:28:28 +00:00
parent b8636a70d1
commit 934a9fcc02
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

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