projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[libFuzzer] honour -only_ascii=1 when reading the initial corpus. Also, remove ugly...
[oota-llvm.git]
/
lib
/
Fuzzer
/
FuzzerUtil.cpp
diff --git
a/lib/Fuzzer/FuzzerUtil.cpp
b/lib/Fuzzer/FuzzerUtil.cpp
index e76adb37481ce400e64a6b3db06e6956fc79ae4a..b04d76d316d81541f95d36463006b410f0a11253 100644
(file)
--- a/
lib/Fuzzer/FuzzerUtil.cpp
+++ b/
lib/Fuzzer/FuzzerUtil.cpp
@@
-86,4
+86,10
@@
bool ToASCII(Unit &U) {
return Changed;
}
+bool IsASCII(const Unit &U) {
+ for (auto X : U)
+ if (!(isprint(X) || isspace(X))) return false;
+ return true;
+}
+
} // namespace fuzzer