summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorPatrick Mézard <patrick@mezard.eu>2012-02-20 14:12:50 +0100
committerPatrick Mézard <patrick@mezard.eu>2012-02-20 14:12:50 +0100
commit857ae345c812297c0e92d65ee3afc354f91a9df9 (patch)
treec80bf0348cdeaf139458c7d6fb627b2733a1e0fc /src/test/test_util.c
parent3a94530595cfb57bdb4e3401d29a8a4d0b638d01 (diff)
downloadtor-857ae345c812297c0e92d65ee3afc354f91a9df9.tar.gz
tor-857ae345c812297c0e92d65ee3afc354f91a9df9.zip
Fix off-by-one error in test_util_make_environment
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 4fabc22ce4..c7540e81a6 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -1945,7 +1945,8 @@ test_util_make_environment(void *ptr)
"HOME=/home/foozer\000"
"PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/bin\000"
"\000";
- size_t expected_windows_env_block_len = sizeof(expected_windows_env_block);
+ size_t expected_windows_env_block_len =
+ sizeof(expected_windows_env_block) - 1;
smartlist_t *env_vars = smartlist_new_from_text_lines(env_vars_string);
smartlist_t *env_vars_sorted = smartlist_new();