aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/proto
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-04-30 14:20:01 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-04-30 14:20:01 -0700
commitf96dbc784dd6a918a4150ee9d2bd2838a838914d (patch)
tree1d5e3dbc0a68e722f1d0fcd97fb23da1999b4cd8 /src/cpp/proto
parentb753ab4cbbdf03fb5200796ba8e6917f31b2672f (diff)
Fix for a crash seen in the wild
Diffstat (limited to 'src/cpp/proto')
-rw-r--r--src/cpp/proto/proto_utils.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc
index b8de2ea173..c16d06fa37 100644
--- a/src/cpp/proto/proto_utils.cc
+++ b/src/cpp/proto/proto_utils.cc
@@ -159,6 +159,7 @@ bool SerializeProto(const grpc::protobuf::Message& msg, grpc_byte_buffer** bp) {
}
bool DeserializeProto(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg) {
+ if (!buffer) return false;
GrpcBufferReader reader(buffer);
return msg->ParseFromZeroCopyStream(&reader);
}