projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b04af2
)
[libFuzzer] Fix index error in SearchMemory() implementation for Windows.
author
Marcos Pividori
<mpividori@google.com>
Fri, 16 Dec 2016 17:35:25 +0000
(17:35 +0000)
committer
Marcos Pividori
<mpividori@google.com>
Fri, 16 Dec 2016 17:35:25 +0000
(17:35 +0000)
Differential Revision: https://reviews.llvm.org/D27731
llvm-svn: 289966
llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
b/llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
index
fea09a6
..
64adb7c
100644
(file)
--- a/
llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
+++ b/
llvm/lib/Fuzzer/FuzzerUtilWindows.cpp
@@
-168,7
+168,7
@@
const void *SearchMemory(const void *Data, size_t DataLen, const void *Patt,
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)