mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-12-17 23:33:59 +00:00
oob read
Signed-off-by: liuwei <liuwei573@huawei.com>
This commit is contained in:
parent
84b8ede6ef
commit
2241daa6c7
@ -625,7 +625,6 @@ bool HdcTransferBase::RecvIOPayload(CtxFile *context, uint8_t *data, int dataSiz
|
||||
pld.uncompressSize <= 0 || pld.uncompressSize > MAX_SIZE_IOBUF) {
|
||||
WRITE_LOG(LOG_FATAL, "RecvIOPayload recv data size is illegal. pld.compressSize = %d", pld.compressSize);
|
||||
}
|
||||
|
||||
switch (pld.compressType) {
|
||||
#ifdef HARMONY_PROJECT
|
||||
case COMPRESS_LZ4: {
|
||||
@ -645,7 +644,6 @@ bool HdcTransferBase::RecvIOPayload(CtxFile *context, uint8_t *data, int dataSiz
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (static_cast<uint32_t>(clearSize) != pld.uncompressSize || dataSize - payloadPrefixReserve < clearSize) {
|
||||
WRITE_LOG(LOG_WARN, "invalid data size for fileIO: %d", clearSize);
|
||||
|
Loading…
Reference in New Issue
Block a user