From 5c9b63f1becf7d5b26613051d8852856fc939df4 Mon Sep 17 00:00:00 2001 From: Tamura Dai Date: Wed, 24 May 2023 16:20:56 +0900 Subject: [PATCH] Use memmove() for copying overlaped areas. Signed-off-by: Tamura Dai --- src/xf86Elo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xf86Elo.c b/src/xf86Elo.c index d356da8..758a198 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -263,7 +263,7 @@ xf86EloGetPacket(unsigned char *buffer, */ ErrorF("Elographics: Dropping one byte in an attempt to synchronize: '%c' 0x%X\n", buffer[0], buffer[0]); - memcpy(&buffer[0], &buffer[1], num_bytes-1); + memmove(&buffer[0], &buffer[1], num_bytes-1); } else { /*