summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-15 13:52:13 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-15 13:52:13 -0400
commit53a94c4b4bf2e75ec4c9132c91cf70ca4520bd1c (patch)
tree99a44d5a374afc0747138d353c32872fd5979460 /src/test
parentd6b2a1709d28c656dadc019fb24145e6ac400771 (diff)
downloadtor-53a94c4b4bf2e75ec4c9132c91cf70ca4520bd1c.tar.gz
tor-53a94c4b4bf2e75ec4c9132c91cf70ca4520bd1c.zip
Clear up another clangalyzer issue
"The NULL pointer warnings on the return value of tor_addr_to_in6_addr32() are incorrect. But clang can't work this out itself due to limited analysis depth. To teach the analyser that the return value is safe to dereference, I applied tor_assert to the return value." Patch from teor. Part of 13157.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 2692f36c55..d1950037e3 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -2910,6 +2910,9 @@ test_util_spawn_background_fail(void *ptr)
const int expected_status = PROCESS_STATUS_RUNNING;
#endif
+ memset(expected_out, 0xf0, sizeof(expected_out));
+ memset(code, 0xf0, sizeof(code));
+
(void)ptr;
tor_snprintf(code, sizeof(code), "%x/%x",