ubsan fixes

This commit is contained in:
laurent
2023-04-19 22:12:08 +02:00
committed by Robert Schmidt
parent 8a10d1b222
commit b735f8bec6
29 changed files with 301 additions and 235 deletions
@@ -2609,6 +2609,7 @@ uint8_t get_ssb_rsrp_payload(NR_UE_MAC_INST_t *mac,
int ssbri_bits = ceil(log2(nb_ssb));
int ssb_rsrp[2][nb_meas]; // the array contains index and RSRP of each SSB to be reported (nb_meas highest RSRPs)
memset(ssb_rsrp, 0, sizeof(ssb_rsrp));
//TODO replace the following 2 lines with a function to order the nb_meas highest SSB RSRPs
for (int i=0; i<nb_ssb; i++) {
+1 -1
View File
@@ -151,7 +151,7 @@ void nr_rlc_pdu_encoder_init(nr_rlc_pdu_encoder_t *encoder,
{
encoder->byte = 0;
encoder->bit = 0;
encoder->buffer = buffer;
encoder->buffer = (unsigned char *)buffer;
encoder->size = size;
}
+1 -1
View File
@@ -71,7 +71,7 @@ int nr_rlc_pdu_decoder_get_bits(nr_rlc_pdu_decoder_t *decoder, int count);
typedef struct {
int byte; /* next byte to encode */
int bit; /* next bit in next byte to encode */
char *buffer;
unsigned char *buffer;
int size;
} nr_rlc_pdu_encoder_t;