From a5fefbfdd3f960ac06c7f72fa4703858e2a48f26 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Thu, 16 Jul 2020 16:00:36 +0200 Subject: [PATCH] Radio: fix possible overflow --- lib/src/radio/radio.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index b0fbb11c1..a3b9f7973 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -33,8 +33,8 @@ radio::radio(srslte::log_filter* log_h_) : logger(nullptr), log_h(log_h_), zeros zeros = srslte_vec_cf_malloc(SRSLTE_SF_LEN_MAX); srslte_vec_cf_zero(zeros, SRSLTE_SF_LEN_MAX); for (uint32_t i = 0; i < SRSLTE_MAX_CHANNELS; i++) { - dummy_buffers[i] = srslte_vec_cf_malloc(SRSLTE_SF_LEN_MAX); - srslte_vec_cf_zero(dummy_buffers[i], SRSLTE_SF_LEN_MAX); + dummy_buffers[i] = srslte_vec_cf_malloc(SRSLTE_SF_LEN_MAX * SRSLTE_NOF_SF_X_FRAME); + srslte_vec_cf_zero(dummy_buffers[i], SRSLTE_SF_LEN_MAX * SRSLTE_NOF_SF_X_FRAME); } }