[session.c]
limit # of env vars to 1000; ok deraadt/djm
- 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
*/
#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"
} 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 *));
}