fixed overflow in tests

This commit is contained in:
Ismael Gomez 2017-06-21 11:22:10 +02:00
parent 9623081da1
commit c47c4b8b03
2 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ int main(int argc, char **argv) {
} }
} }
data = srslte_vec_malloc(sizeof(uint8_t) * grant.mcs.tbs/8); data = srslte_vec_malloc(sizeof(uint8_t) * (grant.mcs.tbs/8)+24);
if (!data) { if (!data) {
perror("srslte_vec_malloc"); perror("srslte_vec_malloc");
goto quit; goto quit;

View File

@ -188,7 +188,7 @@ int main(int argc, char **argv) {
exit(-1); exit(-1);
} }
data = srslte_vec_malloc(sizeof(uint8_t) * cfg.grant.mcs.tbs); data = srslte_vec_malloc(sizeof(uint8_t) * (cfg.grant.mcs.tbs+24));
if (!data) { if (!data) {
perror("malloc"); perror("malloc");
exit(-1); exit(-1);