aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hplip/fix-memmove.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/hplip/fix-memmove.patch')
-rw-r--r--testing/hplip/fix-memmove.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/hplip/fix-memmove.patch b/testing/hplip/fix-memmove.patch
new file mode 100644
index 00000000000..a7e791ff9d4
--- /dev/null
+++ b/testing/hplip/fix-memmove.patch
@@ -0,0 +1,12 @@
+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);
+