From 63353ea48646445c7b084c180b64bfb906fc193f Mon Sep 17 00:00:00 2001 From: Jim Morrison Date: Wed, 15 Feb 2012 14:30:36 -0800 Subject: [PATCH] Ensure read_callback is non-NULL for request bodies. --- lib/spdylay_submit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spdylay_submit.c b/lib/spdylay_submit.c index 86245a0..2b15681 100644 --- a/lib/spdylay_submit.c +++ b/lib/spdylay_submit.c @@ -124,7 +124,7 @@ int spdylay_submit_request(spdylay_session *session, uint8_t pri, if(pri > 3) { return SPDYLAY_ERR_INVALID_ARGUMENT; } - if(data_prd) { + if(data_prd != NULL && data_prd->read_callback != NULL) { data_prd_copy = malloc(sizeof(spdylay_data_provider)); if(data_prd_copy == NULL) { return SPDYLAY_ERR_NOMEM;