rlc_am_lte: fix potential bug when setting uint32_t to -1

discovered in Coverity CID 359664
This commit is contained in:
Andre Puschmann 2020-10-16 14:20:35 +02:00
parent d51a060bfa
commit 1a03839f78
1 changed files with 3 additions and 1 deletions

View File

@ -872,7 +872,9 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt
}
head_len = rlc_am_packed_length(&header);
if (head_len >= pdu_space) {
header.N_li--;
if (header.N_li > 0) {
header.N_li--;
}
break;
}
tx_sdu = tx_sdu_queue.read();