1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/testing/hplip/fix-memmove.patch
Timo Teräs b1b094310c testing/hplip: fix hp backend driver
traps: hp[11433] trap invalid opcode ip:7fa5c58013a5 sp:7ffee538db20 error:0 in libhpmud.so.0.0.6[7fa5c57f9000+b000]
2020-12-04 11:58:00 +02:00

12 lines
548 B
Diff

diff -ru hplip-3.20.5.orig/io/hpmud/musb.c hplip-3.20.5/io/hpmud/musb.c
--- hplip-3.20.5.orig/io/hpmud/musb.c 2020-05-11 16:33:56.000000000 +0300
+++ hplip-3.20.5/io/hpmud/musb.c 2020-07-06 17:48:24.364564601 +0300
@@ -775,7 +775,7 @@
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);