[packages/pdksh] - added memcpy patch (use memmove because of overlapping addresses, detected by valgrind)

qboosh qboosh at pld-linux.org
Sat Mar 17 21:09:27 CET 2018


commit 9e1fe907d803d9472424994bbf85b95ccbdce715
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Mar 17 21:12:13 2018 +0100

    - added memcpy patch (use memmove because of overlapping addresses, detected by valgrind)

 pdksh-memcpy.patch | 11 +++++++++++
 pdksh.spec         |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/pdksh.spec b/pdksh.spec
index 9e1cd91..83e7fd0 100644
--- a/pdksh.spec
+++ b/pdksh.spec
@@ -26,6 +26,7 @@ Source2:	%{name}-kshrc
 Patch0:		%{name}-static.patch
 Patch1:		%{name}-debian.patch
 Patch2:		%{name}-tablesize.patch
+Patch3:		%{name}-memcpy.patch
 Patch4:		%{name}-history.patch
 Patch9:		%{name}-no_stop_alias.patch
 Patch10:	%{name}-man_no_plusminus.patch
@@ -119,6 +120,7 @@ W tym pakiecie jest pdksh skonsolidowany statycznie.
 %{?with_static:%patch0 -p0}
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 %patch4 -p1
 %patch9 -p1
 %patch11 -p1
diff --git a/pdksh-memcpy.patch b/pdksh-memcpy.patch
new file mode 100644
index 0000000..0ba7a2a
--- /dev/null
+++ b/pdksh-memcpy.patch
@@ -0,0 +1,11 @@
+--- pdksh-5.2.14/eval.c.orig	2018-03-17 10:13:44.723945475 +0100
++++ pdksh-5.2.14/eval.c	2018-03-17 20:43:38.363513942 +0100
+@@ -1189,7 +1189,7 @@
+ 	char *d, *s;
+ 
+ 	if ((s = strchr(sp, MAGIC))) {
+-		memcpy(dp, sp, s - sp);
++		memmove(dp, sp, s - sp);
+ 		for (d = dp + (s - sp); *s; s++)
+ 			if (!ISMAGIC(*s) || !(*++s & 0x80)
+ 			    || !strchr("*+?@! ", *s & 0x7f))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pdksh.git/commitdiff/9e1fe907d803d9472424994bbf85b95ccbdce715



More information about the pld-cvs-commit mailing list