ksh/ksh-20120801-argvfix.patch
Petr Šabata db8b5b018f RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/ksh#642af4d65a6ae8825306305765a595a6f10eba47
2020-10-15 15:06:12 +02:00

14 lines
523 B
Diff

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);