diff options
author | Mark D. Roth <roth@google.com> | 2016-08-25 07:57:24 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-08-25 07:57:24 -0700 |
commit | 0002d8322260ad0ae4c7f4266ca7494194f12d45 (patch) | |
tree | 0c5a2e1cbd8f03e04bc24aa52eb5859fdab066c2 /src/core/lib/channel | |
parent | 500a466217760749aebf4a1204781aa36e8ded62 (diff) |
Fix crash caused by invoking receive callback with recv_message=NULL.
Diffstat (limited to 'src/core/lib/channel')
-rw-r--r-- | src/core/lib/channel/message_size_filter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 78aafc7d3d..10cb1998d1 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); |