summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-07-29 22:07:10 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-07-29 22:07:10 +0000
commitae6ad50eda19608f882192d3957502b71845f9ea (patch)
tree501b625703b9d006605c94221480986e97e1e196 /usr.bin
parentb5f15637df8af4597daf3c54f56a05b91d80faac (diff)
use correct length when making a copy of environ
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sudo/env.c4
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;
}