diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-25 20:36:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-25 20:36:57 +0000 |
commit | 3e94c6beeec41b717164714607f823b3a43c9371 (patch) | |
tree | 98cd8ababf7d3f2c13a0eaaf85725733f4e3a945 | |
parent | 54d9c030a9eb88aec5d7bca3eddad4a71b52ed1f (diff) |
proactive buf check
-rw-r--r-- | usr.sbin/cron/env.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/cron/env.c b/usr.sbin/cron/env.c index 0862ffd035e..e0e19e2755b 100644 --- a/usr.sbin/cron/env.c +++ b/usr.sbin/cron/env.c @@ -16,7 +16,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$Id: env.c,v 1.2 1996/09/25 02:06:27 bitblt Exp $"; +static char rcsid[] = "$Id: env.c,v 1.3 1996/10/25 20:36:56 deraadt Exp $"; #endif @@ -154,6 +154,8 @@ load_env(envstr, f) } } + if (strlen(name) + 1 + strlen(val) >= MAX_ENVSTR-1) + return (FALSE); (void) sprintf(envstr, "%s=%s", name, val); Debug(DPARS, ("load_env, <%s> <%s> -> <%s>\n", name, val, envstr)) return (TRUE); |