fixed overflow in tests

master
Ismael Gomez 8 years ago
parent 9623081da1
commit c47c4b8b03

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

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

Loading…
Cancel
Save