Commit b17354b7 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Fix integer overflow

Avoid UBSan error:
  openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c:246:18: runtime error: signed integer overflow: 1457321472 + 922889664 cannot be represented in type 'int'
parent 516b91fc
......@@ -203,7 +203,7 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
unsigned char symbol,
uint8_t nrOfLayers)
{
int rx_power_tot = 0;
uint32_t rx_power_tot = 0;
unsigned short rx_power_avg_dB;
unsigned short rx_power_tot_dB;
RU_t *ru = gNB->RU_list[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment