diff options
author | Yang Gao <yangg@google.com> | 2015-05-01 10:28:55 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-05-01 10:28:55 -0700 |
commit | e217307a6276cb5f08b07728197348a48595d0d6 (patch) | |
tree | 6f9c4c095ee3d7790f3b2b838033bab5dea81d09 | |
parent | 18d43bfcfeeba96109063511ccd59c58283721ee (diff) | |
parent | f96dbc784dd6a918a4150ee9d2bd2838a838914d (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.cc | 1 |
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); } |