Commit f65ad32b authored by metzman's avatar metzman Committed by Commit bot

[AFL][libFuzzer] Fix read past end of fuzzing target input buffer.

BUG=

Review-Url: https://codereview.chromium.org/2193283002
Cr-Commit-Position: refs/heads/master@{#408673}
parent a282a456
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment