aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_util.c
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2010-08-09 10:18:59 -0500
committerPeter Seebach <seebs@laptop-seebs-net.local>2010-08-11 14:37:43 -0500
commit1ea6ccb5d4319348c8e0953b4778d5a5abf067b4 (patch)
tree6ccc476fa23135e4067ceb8ede13b41754b72a8f /pseudo_util.c
parentbd87eec4538921535f6a8e88044996f092643a2b (diff)
downloadpseudo-1ea6ccb5d4319348c8e0953b4778d5a5abf067b4.tar.gz
pseudo-1ea6ccb5d4319348c8e0953b4778d5a5abf067b4.tar.bz2
pseudo-1ea6ccb5d4319348c8e0953b4778d5a5abf067b4.zip
Fix off by 4 error..
We can potentially under allocate memory due.
Diffstat (limited to 'pseudo_util.c')
-rw-r--r--pseudo_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pseudo_util.c b/pseudo_util.c
index ee6e50d..889630e 100644
--- a/pseudo_util.c
+++ b/pseudo_util.c
@@ -512,7 +512,7 @@ pseudo_setupenv(char * const *environ, char *opts) {
found_localstatedir = 1;
++env_count;
}
- env_count += 4 - (found_preload + found_libpath + found_debug + found_opts + found_prefix + found_bindir + found_libdir + found_localstatedir);
+ env_count += 8 - (found_preload + found_libpath + found_debug + found_opts + found_prefix + found_bindir + found_libdir + found_localstatedir);
new_environ = malloc((env_count + 1) * sizeof(*new_environ));
if (!new_environ) {