aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-05-01 10:28:55 -0700
committerGravatar Yang Gao <yangg@google.com>2015-05-01 10:28:55 -0700
commite217307a6276cb5f08b07728197348a48595d0d6 (patch)
tree6f9c4c095ee3d7790f3b2b838033bab5dea81d09
parent18d43bfcfeeba96109063511ccd59c58283721ee (diff)
parentf96dbc784dd6a918a4150ee9d2bd2838a838914d (diff)
Merge pull request #1436 from ctiller/crash-cxx
Fix for a crash seen in the wild
-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);
}