Fix integer overflow
Avoid UBSan error: openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c:183:22: runtime error: signed integer overflow: 2122747784 + 27403601 cannot be represented in type 'int'
This commit is contained in:
@@ -162,7 +162,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
|
|||||||
} //rb
|
} //rb
|
||||||
} // symb
|
} // symb
|
||||||
int nb_rb=0;
|
int nb_rb=0;
|
||||||
int32_t n0_subband_tot=0;
|
int64_t n0_subband_tot=0;
|
||||||
int32_t n0_subband_tot_perANT[frame_parms->nb_antennas_rx];
|
int32_t n0_subband_tot_perANT[frame_parms->nb_antennas_rx];
|
||||||
|
|
||||||
memset(n0_subband_tot_perANT, 0, sizeof(n0_subband_tot_perANT));
|
memset(n0_subband_tot_perANT, 0, sizeof(n0_subband_tot_perANT));
|
||||||
|
|||||||
Reference in New Issue
Block a user