Fix buffer overflow for 4-layers DL

This commit is contained in:
Roberto Louro Magueta
2023-02-27 11:31:51 +01:00
committed by laurent
parent d8c97ec756
commit dcae2e7f68
@@ -2205,10 +2205,10 @@ uint8_t nr_zero_forcing_rx(uint32_t rx_size,
///Allocate H^*H matrix elements and sub elements ///Allocate H^*H matrix elements and sub elements
conjH_H_elements = (int32_t ***)malloc16_clear(n_rx * sizeof(int32_t **)); conjH_H_elements = (int32_t ***)malloc16_clear(n_rx * sizeof(int32_t **));
for (int aarx = 0; aarx < n_rx; aarx++) { for (int aarx = 0; aarx < n_rx; aarx++) {
conjH_H_elements[aarx] = (int32_t **)malloc16_clear( n_tx*n_tx*sizeof(int32_t) ); conjH_H_elements[aarx] = (int32_t **)malloc16_clear(n_tx * n_tx * sizeof(int32_t *));
for (int rtx = 0; rtx < n_tx; rtx++) { // row for (int rtx = 0; rtx < n_tx; rtx++) { // row
for (int ctx = 0; ctx < n_tx; ctx++) { // column for (int ctx = 0; ctx < n_tx; ctx++) { // column
conjH_H_elements[aarx][ctx*n_tx+rtx] = (int32_t *)malloc16_clear( 12*nb_rb_0*sizeof(int32_t *) ); conjH_H_elements[aarx][ctx * n_tx + rtx] = (int32_t *)malloc16_clear(12 * nb_rb_0 * sizeof(int32_t));
} }
} }
} }