]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Initialize the mock options in the fuzzing code
authorNick Mathewson <nickm@torproject.org>
Mon, 30 Oct 2017 21:05:26 +0000 (17:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 30 Oct 2017 21:05:26 +0000 (17:05 -0400)
Fixes bug 24082; bugfix on 0.3.0.3-alpha.  Found by Brian Carpenter.

changes/bug24082 [new file with mode: 0644]
src/test/fuzz/fuzzing_common.c

diff --git a/changes/bug24082 b/changes/bug24082
new file mode 100644 (file)
index 0000000..1523239
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (testing):
+    - Fix a spurious fuzzing-only use of an uninitialized value.
+      Found by Brian Carpenter. Fixes bug 24082; bugfix on 0.3.0.3-alpha.
index 7aee92df636ae064fe90646b6f9cc4406d62213f..7ebddde1a88ae9dfd47014c27ca4a87d1a563b98 100644 (file)
@@ -107,7 +107,7 @@ global_init(void)
   configure_backtrace_handler(get_version());
 
   /* set up the options. */
-  mock_options = tor_malloc(sizeof(or_options_t));
+  mock_options = tor_malloc_zero(sizeof(or_options_t));
   MOCK(get_options, mock_get_options);
 
   /* Make BUG() and nonfatal asserts crash */