[PATCH] D27731: [libFuzzer] Diff 22 - Fix index error in SearchMemory() implementation for Windows.
Marcos Pividori via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 14:04:44 PST 2016
mpividori created this revision.
mpividori added a reviewer: zturner.
mpividori added a subscriber: llvm-commits.
mpividori set the repository for this revision to rL LLVM.
Repository:
rL LLVM
https://reviews.llvm.org/D27731
Files:
lib/Fuzzer/FuzzerUtilWindows.cpp
Index: lib/Fuzzer/FuzzerUtilWindows.cpp
===================================================================
--- lib/Fuzzer/FuzzerUtilWindows.cpp
+++ lib/Fuzzer/FuzzerUtilWindows.cpp
@@ -168,7 +168,7 @@
if (PattLen == 1)
return memchr(Data, *Cpatt, DataLen);
- const char *End = Cdata + DataLen - PattLen;
+ const char *End = Cdata + DataLen - PattLen + 1;
for (const char *It = Cdata; It < End; ++It)
if (It[0] == Cpatt[0] && memcmp(It, Cpatt, PattLen) == 0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27731.81298.patch
Type: text/x-patch
Size: 481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161213/ac7064dc/attachment.bin>
More information about the llvm-commits
mailing list