Fix unbounded memory access

master
Xavier Arteaga 4 years ago committed by Xavier Arteaga
parent 29c6adad93
commit 39e97cbcf4

@ -648,7 +648,7 @@ int sch_nr_decode(srsran_sch_nr_t* q,
// Check if TB is all zeros
bool all_zeros = true;
for (uint32_t i = 0; i < tb->tbs && all_zeros; i++) {
for (uint32_t i = 0; i < tb->tbs / 8 && all_zeros; i++) {
all_zeros = (data[i] == 0);
}

Loading…
Cancel
Save