- dtucker@cvs.openbsd.org 2004/06/23 14:31:01
[ssh.c]
Fix counting in master/slave when passing environment variables; ok djm@
diff --git a/ChangeLog b/ChangeLog
index d2358bd..023fde0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,9 @@
- mouring@cvs.openbsd.org 2004/06/23 00:39:38
[rijndael.c]
-Wshadow fix up s/encrypt/do_encrypt/. OK djm@, markus@
+ - dtucker@cvs.openbsd.org 2004/06/23 14:31:01
+ [ssh.c]
+ Fix counting in master/slave when passing environment variables; ok djm@
- (dtucker) [cipher.c] encrypt->do_encrypt inside SSH_OLD_EVP to match
-Wshadow change.
- (bal) [Makefile.in] Remove opensshd.init on 'make distclean'
@@ -1396,4 +1399,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.3442 2004/06/23 14:33:48 dtucker Exp $
+$Id: ChangeLog,v 1.3443 2004/06/23 14:34:53 dtucker Exp $
diff --git a/ssh.c b/ssh.c
index 9e3f735..767d99c 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.221 2004/06/21 17:36:31 avsm Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.222 2004/06/23 14:31:01 dtucker Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -1304,9 +1304,11 @@
buffer_put_int(&m, num_env);
- for (i = 0; environ[i] != NULL && num_env >= 0; i++, num_env--)
- if (env_permitted(environ[i]))
+ for (i = 0; environ[i] != NULL && num_env >= 0; i++)
+ if (env_permitted(environ[i])) {
+ num_env--;
buffer_put_cstring(&m, environ[i]);
+ }
}
if (ssh_msg_send(sock, /* version */0, &m) == -1)