summaryrefslogtreecommitdiffstats
path: root/source/ap/ksh93/patches/ksh-20120801-argvfix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/ksh93/patches/ksh-20120801-argvfix.patch')
-rw-r--r--source/ap/ksh93/patches/ksh-20120801-argvfix.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/ap/ksh93/patches/ksh-20120801-argvfix.patch b/source/ap/ksh93/patches/ksh-20120801-argvfix.patch
new file mode 100644
index 000000000..b0e1a7823
--- /dev/null
+++ b/source/ap/ksh93/patches/ksh-20120801-argvfix.patch
@@ -0,0 +1,13 @@
+diff -up ksh-20120801/src/cmd/ksh93/sh/main.c.fixargs ksh-20120801/src/cmd/ksh93/sh/main.c
+--- ksh-20120801/src/cmd/ksh93/sh/main.c.fixargs 2013-12-31 11:32:14.917874134 +0100
++++ ksh-20120801/src/cmd/ksh93/sh/main.c 2013-12-31 11:32:58.028847126 +0100
+@@ -757,7 +757,7 @@ static void fixargs(char **argv, int mod
+ offset += size;
+ buff[offset++] = ' ';
+ }
+- buff[offset-1] = 0;
++ memset(&buff[offset - 1], 0, command_len - offset + 1);
+ # ifdef PSTAT
+ un.pst_command = stakptr(0);
+ pstat(PSTAT_SETCMD,un,0,0,0);
+