Skip to content
Snippets Groups Projects
Commit f489a751 authored by Michael Cook's avatar Michael Cook
Browse files

Fix memcpy with overlapping memory

Found by valgrind.
parent 03157f93
No related branches found
No related tags found
6 merge requests!1757Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c,!1493fix DL arq errors in UE,!1381integration_2021_wk51_d_2,!1362WIP: integration_2021_wk50_a,!1271Draft: L2 Emulator for NSA Mode,!1059Multi-UE scalability with L2 Emulator
......@@ -132,7 +132,7 @@ uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const fra
}
// move the selected RAR to the front of the RA_PDSCH buffer
memcpy(selected_rar_buffer + 0, (uint8_t *) rarh, 1);
memcpy(selected_rar_buffer + 1, (uint8_t *) rar, 6);
memmove(selected_rar_buffer + 0, (uint8_t *) rarh, 1);
memmove(selected_rar_buffer + 1, (uint8_t *) rar, 6);
return ret;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment