Fixed potentially overlapping memcpy() to use memmove()

This commit is contained in:
Sam Lantinga
2025-01-14 14:31:20 -08:00
parent 191a6417d5
commit 49dd24e195
4 changed files with 4 additions and 4 deletions

View File

@@ -387,7 +387,7 @@ static bool HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device)
j = -1;
for (i = 0; i < 12; i += 2) {
j += 1;
SDL_memcpy(&serial[j], &device->serial[i], 2);
SDL_memmove(&serial[j], &device->serial[i], 2);
j += 2;
serial[j] = '-';
}