summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--session.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f9db38e6..88b155ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,9 @@
- markus@cvs.openbsd.org 2002/06/26 08:55:02
[channels.c]
limit # of channels to 10000
+ - markus@cvs.openbsd.org 2002/06/26 08:58:26
+ [session.c]
+ limit # of env vars to 1000; ok deraadt/djm
20020625
- (stevesk) [INSTALL acconfig.h configure.ac defines.h] remove --with-rsh
@@ -1144,4 +1147,4 @@
- (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
-$Id: ChangeLog,v 1.2292 2002/06/26 09:14:43 djm Exp $
+$Id: ChangeLog,v 1.2293 2002/06/26 09:15:07 djm Exp $
diff --git a/session.c b/session.c
index aadc82fe..51c8a0ae 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.140 2002/06/23 21:06:41 deraadt Exp $");
+RCSID("$OpenBSD: session.c,v 1.141 2002/06/26 08:58:26 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -849,6 +849,9 @@ child_set_env(char ***envp, u_int *envsizep, const char *name,
} else {
/* New variable. Expand if necessary. */
if (i >= (*envsizep) - 1) {
+ if (*envsizep >= 1000)
+ fatal("child_set_env: too many env vars,"
+ " skipping: %.100s", name);
(*envsizep) += 50;
env = (*envp) = xrealloc(env, (*envsizep) * sizeof(char *));
}