diff options
author | 2007-07-29 22:07:09 +0000 | |
---|---|---|
committer | 2007-07-29 22:07:09 +0000 | |
commit | 294e145eaf91ca6c9a1041123458521a8796ba6e (patch) | |
tree | ae52b0ae40febd1fa63aacef88d19ac24a08ee7e | |
parent | slot range check in add_nubus_intr() is wrong by one. (diff) | |
download | wireguard-openbsd-294e145eaf91ca6c9a1041123458521a8796ba6e.tar.xz wireguard-openbsd-294e145eaf91ca6c9a1041123458521a8796ba6e.zip |
use correct length when making a copy of environ
-rw-r--r-- | usr.bin/sudo/env.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sudo/env.c b/usr.bin/sudo/env.c index 50adbae26fb..1652c8015d3 100644 --- a/usr.bin/sudo/env.c +++ b/usr.bin/sudo/env.c @@ -52,7 +52,7 @@ #include "sudo.h" #ifndef lint -__unused static const char rcsid[] = "$Sudo: env.c,v 1.39.2.15 2007/07/09 19:15:43 millert Exp $"; +__unused static const char rcsid[] = "$Sudo: env.c,v 1.39.2.16 2007/07/29 20:10:19 millert Exp $"; #endif /* lint */ /* @@ -629,7 +629,7 @@ insert_env_vars(envp, env_vars) env.env_size = evlen + 1 + 128; env.envp = emalloc2(env.env_size, sizeof(char *)); } - memcpy(env.envp, envp, evlen + 1); + memcpy(env.envp, envp, (evlen + 1) * sizeof(char *)); env.env_len = evlen; } |