summaryrefslogtreecommitdiff
path: root/system/pdksh/patches/044_Debian-emacs-crash.patch
diff options
context:
space:
mode:
authorDaniel LEVAI <leva@ecentrum.hu>2010-05-13 01:01:03 +0200
committerMichiel van Wessem <michiel@slackbuilds.org>2010-05-13 01:01:03 +0200
commit6ec76a9860188c0e2de54daf61f5a4ff590ad8ef (patch)
treeedd70b526118253bc6ab17c0dcd069325fa5016f /system/pdksh/patches/044_Debian-emacs-crash.patch
parent387f1e8f9c14fc5648eee03d43787806c806fe20 (diff)
downloadslackbuilds-6ec76a9860188c0e2de54daf61f5a4ff590ad8ef.tar.gz
system/pdksh: Added to 13.0 repository
Diffstat (limited to 'system/pdksh/patches/044_Debian-emacs-crash.patch')
-rw-r--r--system/pdksh/patches/044_Debian-emacs-crash.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/system/pdksh/patches/044_Debian-emacs-crash.patch b/system/pdksh/patches/044_Debian-emacs-crash.patch
new file mode 100644
index 0000000000..047302811b
--- /dev/null
+++ b/system/pdksh/patches/044_Debian-emacs-crash.patch
@@ -0,0 +1,18 @@
+ * emacs.c: Fix segmentation fault bug when ksh used bash history file
+ (closes: #284358).
+Index: pdksh-5.2.14/emacs.c
+===================================================================
+--- pdksh-5.2.14.orig/emacs.c 2008-04-15 20:49:47.000000000 +0200
++++ pdksh-5.2.14/emacs.c 2008-04-15 20:53:50.000000000 +0200
+@@ -883,9 +883,9 @@
+ }
+ x_histp = hp;
+ oldsize = x_size_str(xbuf);
+- (void)strcpy(xbuf, *hp);
++ (void)strncpy(xbuf, *hp, xend - xbuf - 1);
+ xbp = xbuf;
+- xep = xcp = xbuf + strlen(*hp);
++ xep = xcp = xbuf + strlen(xbuf);
+ xlp_valid = FALSE;
+ if (xep > x_lastcp())
+ x_goto(xep);