aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-05-06 08:15:24 -0400
committerMichael Mann <mmann78@netscape.net>2017-11-04 13:14:23 +0000
commit1741b6b23c39d1f38956d005d70cbef2ee5e5f79 (patch)
tree809716b6996050167d7e4f478f3c8d20c87fa7a0 /tools
parentd11f5dff8ef9e615a8d5d01ee8b88241fea42f09 (diff)
oss-fuzzshark: force direct malloc
Set two environment variables (needs to be done before epan_init and before the first g_slice_alloc call) to force direct memory allocation without another layer that could hide bugs. Change-Id: I0d72092c239e2e7f42b0b7849c01471407e785e2 Reviewed-on: https://code.wireshark.org/review/21195 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/oss-fuzzshark/fuzzshark.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/oss-fuzzshark/fuzzshark.c b/tools/oss-fuzzshark/fuzzshark.c
index b6235650d2..9500d99f6a 100644
--- a/tools/oss-fuzzshark/fuzzshark.c
+++ b/tools/oss-fuzzshark/fuzzshark.c
@@ -146,6 +146,9 @@ fuzz_init(int argc _U_, char **argv)
dissector_handle_t fuzz_handle = NULL;
#endif
+ setenv("WIRESHARK_DEBUG_WMEM_OVERRIDE", "simple", 0);
+ setenv("G_SLICE", "always-malloc", 0);
+
cmdarg_err_init(failure_warning_message, failure_message_cont);
/*