Added a comment to justify pdu_len checks in gNB

This commit is contained in:
Melissa Elkadi
2022-02-24 09:03:00 -08:00
parent 0165ffd160
commit 5f7f56f056
@@ -261,6 +261,10 @@ int nr_process_mac_pdu(module_id_t module_idP,
case UL_SCH_LCID_L_TRUNCATED_BSR:
//38.321 section 6.1.3.1
//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))
return 0;
mac_ce_len |= (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pduP)->L;