Files
packages/utils/hplip/patches/030-replace_unsafe_memcpy_with_memmove.patch
Luiz Angelo Daros de Luca f698b9c8a8 hplip: update to 3.23.12
See: https://developers.hp.com/hp-linux-imaging-and-printing/release_notes

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2024-06-16 16:42:03 -07:00

16 lines
526 B
Diff

https://bugs.launchpad.net/hplip/+bug/1672256
memcpy should never be used with overlapping memory regions
--- a/io/hpmud/musb.c
+++ b/io/hpmud/musb.c
@@ -776,7 +776,7 @@ static int device_id(int fd, unsigned ch
len = size-1; /* leave byte for zero termination */
if (len > 2)
len -= 2;
- memcpy(buffer, buffer+2, len); /* remove length */
+ memmove(buffer, buffer+2, len); /* remove length */
buffer[len]=0;
DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);