]> granicus.if.org Git - sudo/commitdiff
Use MAX_UID_T_LEN + 1 for uid/gid buffers, not MAX_UID_T_LEN to
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 27 Jun 2012 17:43:30 +0000 (13:43 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 27 Jun 2012 17:43:30 +0000 (13:43 -0400)
prevent potential truncation.  Bug #562.

--HG--
branch : 1.7

env.c

diff --git a/env.c b/env.c
index 05f7e74110bfb7a1f365adf354f23d514a4f4550..b1e0971f6569d55bf5fd18f04aed2065647908d3 100644 (file)
--- a/env.c
+++ b/env.c
@@ -651,7 +651,7 @@ rebuild_env(noexec)
     int noexec;
 {
     char **old_envp, **ep, *cp, *ps1;
-    char idbuf[MAX_UID_T_LEN];
+    char idbuf[MAX_UID_T_LEN + 1];
     unsigned int didvar;
     int reset_home = FALSE;