aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp b/examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp
index 04329acc..434c3d5b 100644
--- a/examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp
+++ b/examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp
@@ -18,11 +18,11 @@
// simple function containing a crash that requires coverage and string compare
// instrumentation for the fuzzer to find
-void parseInternal(const std::string &input) {
+__attribute__((optnone)) void parseInternal(const std::string &input) {
if (input[0] == 'a' && input[1] == 'b' && input[5] == 'c') {
if (input.find("secret_in_native_library") != std::string::npos) {
// BOOM
- *(char *)1 = 2;
+ [[maybe_unused]] char foo = input[input.size() + 2];
}
}
}