Signed-off-by: liuwei <liuwei573@huawei.com>
This commit is contained in:
liuwei 2024-07-29 12:03:20 +08:00
parent c01ad113c2
commit 154421891a

View File

@ -621,9 +621,9 @@ bool HdcTransferBase::RecvIOPayload(CtxFile *context, uint8_t *data, int dataSiz
SerialStruct::ParseFromString(pld, serialString);
int clearSize = 0;
StartTraceScope("HdcTransferBase::RecvIOPayload");
if (pld.compressSize <= 0 || pld.compressSize > MAX_SIZE_IOBUF ||
pld.uncompressSize <= 0 || pld.uncompressSize > MAX_SIZE_IOBUF) {
WRITE_LOG(LOG_FATAL, "RecvIOPayload recv data size is illegal. pld.compressSize = %d", pld.compressSize);
if (pld.compressSize <= 0 || pld.compressSize > dataSize ||
pld.uncompressSize <= 0 || pld.uncompressSize > dataSize) {
WRITE_LOG(LOG_FATAL, "compress size is greater than the dataSize. pld.compressSize = %d", pld.compressSize);
return false;
}
if (pld.compressSize > 0) {