Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: testing/libfuzzer/fuzzers/string_tokenizer_fuzzer.cc

Issue 2193283002: [AFL][libFuzzer] Fix read past end of fuzzing target input buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/fuzzers/string_tokenizer_fuzzer.cc
diff --git a/testing/libfuzzer/fuzzers/string_tokenizer_fuzzer.cc b/testing/libfuzzer/fuzzers/string_tokenizer_fuzzer.cc
index 44852b3217021d4da043a348fc520fc17ebd8aef..c41b8aecc4f2a0990030c00c5f77536442ee0ffd 100644
--- a/testing/libfuzzer/fuzzers/string_tokenizer_fuzzer.cc
+++ b/testing/libfuzzer/fuzzers/string_tokenizer_fuzzer.cc
@@ -26,7 +26,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// won't be called.
size_t pattern_size = data[0];
- if (pattern_size > size) {
+ if (pattern_size > size - 1) {
return 0;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698