ALT Linux repos
S: | 9.4p1-alt1 |
5.0: | 5.2p1-alt1.1 |
4.1: | 5.0p1-alt3 |
4.0: | 5.0p1-alt3 |
+updates: | 4.7p1-alt1 |
3.0: | 3.6.1p2-alt6 |
Group :: Networking/Remote access
RPM: openssh
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: openssh-3.6.1p2-cvs-20030515-argv.patch
Download
Download
Index: sshd.c
===================================================================
RCS file: /cvs/openssh/sshd.c,v
retrieving revision 1.241
retrieving revision 1.242
diff -u -p -r1.241 -r1.242
--- sshd.c 14 May 2003 05:11:48 -0000 1.241
+++ sshd.c 15 May 2003 11:29:10 -0000 1.242
@@ -830,9 +830,10 @@ main(int ac, char **av)
/* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
saved_argc = ac;
saved_argv = av;
- saved_argv = xmalloc(sizeof(*saved_argv) * ac);
+ saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1));
for (i = 0; i < ac; i++)
saved_argv[i] = xstrdup(av[i]);
+ saved_argv[i] = NULL;
#ifndef HAVE_SETPROCTITLE
/* Prepare for later setproctitle emulation */