Added a comment to justify pdu_len checks in gNB
This commit is contained in:
@@ -261,6 +261,10 @@ int nr_process_mac_pdu(module_id_t module_idP,
|
|||||||
case UL_SCH_LCID_L_TRUNCATED_BSR:
|
case UL_SCH_LCID_L_TRUNCATED_BSR:
|
||||||
//38.321 section 6.1.3.1
|
//38.321 section 6.1.3.1
|
||||||
//variable length
|
//variable length
|
||||||
|
/* Several checks have been added to this function to
|
||||||
|
ensure that the casting of the pduP is possible. There
|
||||||
|
is an actual bug here, but it has not been resolved. This
|
||||||
|
means that the scheduled transport block size is invalid. */
|
||||||
if (pdu_len < sizeof(NR_MAC_SUBHEADER_SHORT))
|
if (pdu_len < sizeof(NR_MAC_SUBHEADER_SHORT))
|
||||||
return 0;
|
return 0;
|
||||||
mac_ce_len |= (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pduP)->L;
|
mac_ce_len |= (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pduP)->L;
|
||||||
|
|||||||
Reference in New Issue
Block a user