Skip to content

Commit 1cac0b8

Browse files
committed
fix(fuzzer): pass strstr operands in order
Containment tracing must pass haystack and needle to libFuzzer in the expected order so string guidance reflects the actual comparison.
1 parent 5533083 commit 1cac0b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/fuzzer/shared/tracing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void TraceStringContainment(const Napi::CallbackInfo &info) {
147147
// libFuzzer currently ignores the result, which allows us to simply pass a
148148
// valid but arbitrary pointer here instead of performing an actual strstr
149149
// operation.
150-
__sanitizer_weak_hook_strstr((void *)id, needle.c_str(), haystack.c_str(),
150+
__sanitizer_weak_hook_strstr((void *)id, haystack.c_str(), needle.c_str(),
151151
needle.c_str());
152152
}
153153

0 commit comments

Comments
 (0)