Null dereferencing fix
This commit is contained in:
parent
a56eb4f53f
commit
03a1e7779b
1 changed files with 12 additions and 2 deletions
|
@ -1430,7 +1430,11 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize,
|
|||
else if (gRfuLinkStatus->parentChild == MODE_CHILD)
|
||||
llFrameSize_p = &gRfuLinkStatus->remainLLFrameSizeChild[bm_slot_id];
|
||||
frameSize = llsf_struct[gRfuLinkStatus->parentChild].frameSize;
|
||||
#if UBFIX
|
||||
if (llFrameSize_p && (subFrameSize > *llFrameSize_p || subFrameSize <= frameSize))
|
||||
#else
|
||||
if (subFrameSize > *llFrameSize_p || subFrameSize <= frameSize)
|
||||
#endif
|
||||
return ERR_SUBFRAME_SIZE;
|
||||
imeBak = REG_IME;
|
||||
REG_IME = 0;
|
||||
|
@ -1468,6 +1472,9 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize,
|
|||
} while (0);
|
||||
}
|
||||
gRfuLinkStatus->sendSlotNIFlag |= bmSendSlot;
|
||||
#if UBFIX
|
||||
if (llFrameSize_p)
|
||||
#endif
|
||||
*llFrameSize_p -= subFrameSize;
|
||||
slotStatus_NI->send.state = SLOT_STATE_SEND_START;
|
||||
}
|
||||
|
@ -1477,6 +1484,9 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize,
|
|||
slotStatus_UNI->send.bmSlot = bmSendSlot;
|
||||
slotStatus_UNI->send.src = src;
|
||||
slotStatus_UNI->send.payloadSize = subFrameSize - frameSize;
|
||||
#if UBFIX
|
||||
if (llFrameSize_p)
|
||||
#endif
|
||||
*llFrameSize_p -= subFrameSize;
|
||||
slotStatus_UNI->send.state = SLOT_STATE_SEND_UNI;
|
||||
gRfuLinkStatus->sendSlotUNIFlag |= bmSendSlot;
|
||||
|
|
Loading…
Reference in a new issue