Bugfix: fix return value when null

Signed-off-by: z00838083 <zhuhuixuan@huawei.com>
This commit is contained in:
z00838083 2024-09-18 09:17:46 +08:00
parent 2e69a6ae3d
commit 5eef012832

View File

@ -143,6 +143,7 @@ int32_t DSchedSoftbusSession::GetFragDataHeader(uint8_t *ptrPacket, SessionDataH
uint16_t index = 0; uint16_t index = 0;
uint16_t byteLeft = BINARY_HEADER_FRAG_LEN - i; uint16_t byteLeft = BINARY_HEADER_FRAG_LEN - i;
if (ptrPacket == nullptr) { if (ptrPacket == nullptr) {
ret = ERR_NULL_OBJECT;
break; break;
} }
ret = ReadTlvToHeader(ptrPacket + i, headerPara, index, byteLeft); ret = ReadTlvToHeader(ptrPacket + i, headerPara, index, byteLeft);