From: Todd C. Miller Date: Mon, 31 Dec 2001 05:53:23 +0000 (+0000) Subject: Fix off by one error in number of bytes allocated via malloc (does not X-Git-Tag: SUDO_1_6_4~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=705c4c75159da77d1904163cbf8b176b91f9635b;p=sudo Fix off by one error in number of bytes allocated via malloc (does not affected any released version of sudo). --- diff --git a/env.c b/env.c index d15e76505..0f82158cc 100644 --- a/env.c +++ b/env.c @@ -431,7 +431,7 @@ rebuild_env(sudo_mode, envp) /* Add the SUDO_COMMAND envariable (cmnd + args). */ if (user_args) { - cp = emalloc(strlen(user_cmnd) + strlen(user_args) + 14); + cp = emalloc(strlen(user_cmnd) + strlen(user_args) + 15); sprintf(cp, "SUDO_COMMAND=%s %s", user_cmnd, user_args); insert_env(newenvp, cp); } else