!1401 huge method 拆解

Merge pull request !1401 from hw-wLiu/master
This commit is contained in:
openharmony_ci 2024-07-30 11:06:24 +00:00 committed by Gitee
commit 9235c19b09
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -621,8 +621,7 @@ 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 > dataSize ||
pld.uncompressSize <= 0 || pld.uncompressSize > dataSize) {
if (pld.compressSize > dataSize || pld.uncompressSize > MAX_SIZE_IOBUF) {
WRITE_LOG(LOG_FATAL, "compress size is greater than the dataSize. pld.compressSize = %d", pld.compressSize);
return false;
}