llvm.org GIT mirror llvm / 4682af7
[libFuzzer] Fix index error in SearchMemory() implementation for Windows. Differential Revision: https://reviews.llvm.org/D27731 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289966 91177308-0d34-0410-b5e6-96231b3b80d8 Marcos Pividori 3 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
167167 if (PattLen == 1)
168168 return memchr(Data, *Cpatt, DataLen);
169169
170 const char *End = Cdata + DataLen - PattLen;
170 const char *End = Cdata + DataLen - PattLen + 1;
171171
172172 for (const char *It = Cdata; It < End; ++It)
173173 if (It[0] == Cpatt[0] && memcmp(It, Cpatt, PattLen) == 0)