View | Details | Raw Unified | Return to bug 529 | Differences between
and this patch

Collapse All | Expand All

(-)openssh-3.6.1p2-vs-openbsd.diff.orig (-2 / +3 lines)
Lines 35955-35961 Link Here
35955
 		/* File descriptor passing is broken or root login */
35955
 		/* File descriptor passing is broken or root login */
35956
 		monitor_apply_keystate(pmonitor);
35956
 		monitor_apply_keystate(pmonitor);
35957
 		use_privsep = 0;
35957
 		use_privsep = 0;
35958
@@ -804,8 +821,23 @@
35958
@@ -804,8 +821,24 @@
35959
 	Key *key;
35959
 	Key *key;
35960
 	int ret, key_used = 0;
35960
 	int ret, key_used = 0;
35961
 
35961
 
Lines 35969-35977 Link Here
35969
+	/* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
35969
+	/* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
35970
+	saved_argc = ac;
35970
+	saved_argc = ac;
35971
 	saved_argv = av;
35971
 	saved_argv = av;
35972
+	saved_argv = xmalloc(sizeof(*saved_argv) * ac);
35972
+	saved_argv = xmalloc(sizeof(*saved_argv) * ac + 1);
35973
+	for (i = 0; i < ac; i++)
35973
+	for (i = 0; i < ac; i++)
35974
+		saved_argv[i] = xstrdup(av[i]);
35974
+		saved_argv[i] = xstrdup(av[i]);
35975
+	saved_argv[ac] = NULL;
35975
+
35976
+
35976
+#ifndef HAVE_SETPROCTITLE
35977
+#ifndef HAVE_SETPROCTITLE
35977
+	/* Prepare for later setproctitle emulation */
35978
+	/* Prepare for later setproctitle emulation */

Return to bug 529