From 63125876219d168709e39cb68af0215c240e681b Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Wed, 12 Jun 2024 10:36:58 +0200 Subject: [PATCH] Fix integer overflow Avoid UBSan error: openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c:1524:41: runtime error: signed integer overflow: 737285888 + 1459370880 cannot be represented in type 'int' --- openair1/PHY/defs_gNB.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index 4dc930c22c..7af241ebaa 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -343,7 +343,7 @@ typedef struct { /// \f$\log_2(\max|H_i|^2)\f$ int16_t log2_maxh; /// measured RX power based on DRS - int ulsch_power[8]; + uint32_t ulsch_power[8]; /// total signal over antennas uint32_t ulsch_power_tot; /// measured RX noise power