Fix buffer overflow and compiler warnings #2

Merged
thomas merged 2 commits from rudi_s into main 2024-04-27 17:37:36 +02:00
Showing only changes of commit b3ceb50b23 - Show all commits

View file

@ -415,7 +415,7 @@ result_t layer1_rx_process(layer1_rx_t *rx, const float complex *samples, size_t
if(symbol_counter == rx->payload_len_symbols) { if(symbol_counter == rx->payload_len_symbols) {
unsigned int nsyms; unsigned int nsyms;
unsigned char payload_enc[rx->payload_len_enc_bytes]; unsigned char payload_enc[rx->payload_len_enc_bytes];
unsigned char payload[rx->payload_len_bytes]; unsigned char payload[rx->payload_len_bytes+1];
ERR_CHECK_LIQUID(liquid_repack_bytes( ERR_CHECK_LIQUID(liquid_repack_bytes(
symbols_int, modem_get_bps(rx->payload_demod), rx->payload_len_symbols, symbols_int, modem_get_bps(rx->payload_demod), rx->payload_len_symbols,