From 0002d8322260ad0ae4c7f4266ca7494194f12d45 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 25 Aug 2016 07:57:24 -0700 Subject: [PATCH] Fix crash caused by invoking receive callback with recv_message=NULL. --- src/core/lib/channel/message_size_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 78aafc7d3d5..10cb1998d13 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -63,7 +63,8 @@ static void recv_message_ready(grpc_exec_ctx* exec_ctx, void* user_data, grpc_call_element* elem = user_data; call_data* calld = elem->call_data; channel_data* chand = elem->channel_data; - if ((*calld->recv_message)->length > chand->max_recv_size) { + if (*calld->recv_message != NULL && + (*calld->recv_message)->length > chand->max_recv_size) { char* message_string; gpr_asprintf(&message_string, "Received message larger than max (%lu)", (unsigned long)chand->max_recv_size);