aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hplip/fix-memmove.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-12-04 11:56:28 +0200
committerTimo Teräs <timo.teras@iki.fi>2020-12-04 11:58:00 +0200
commitb1b094310c29b8f00187f76d3306b3d848c5fedb (patch)
tree289612ed335e1eaed6744961d33e672a06b2e671 /testing/hplip/fix-memmove.patch
parent95c248a39ef85a8301282e7fe8335b78d1fa40fb (diff)
downloadaports-b1b094310c29b8f00187f76d3306b3d848c5fedb.tar.gz
aports-b1b094310c29b8f00187f76d3306b3d848c5fedb.tar.bz2
aports-b1b094310c29b8f00187f76d3306b3d848c5fedb.tar.xz
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]
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 0000000000..a7e791ff9d
--- /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);
+