Skip to content

Commit e740615

Browse files
committed
fix protobuf client ParseFromArray error
1 parent 8f1e0fc commit e740615

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pink/src/pb_cli.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ Status PbCli::Recv(void *msg_res) {
8181
return s;
8282
}
8383

84-
res->ParseFromArray(rbuf_, packet_len);
84+
if (!res->ParseFromArray(rbuf_ , packet_len)) {
85+
return Status::Corruption("PbCli::Recv Protobuf ParseFromArray error");
86+
}
8587
return Status::OK();
8688
}
8789

0 commit comments

Comments
 (0)