Fix unbounded memory access

This commit is contained in:
Xavier Arteaga 2021-03-26 09:54:16 +01:00 committed by Xavier Arteaga
parent 29c6adad93
commit 39e97cbcf4
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}