summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerIO.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-02-02 02:07:26 +0000
committerKostya Serebryany <kcc@google.com>2016-02-02 02:07:26 +0000
commit078e984d8d8f05a525c3322a9adf49857d5b5f83 (patch)
tree37c82dbb3dcf03a7fa055458d74620634a868546 /llvm/lib/Fuzzer/FuzzerIO.cpp
parente67b402e4544dd6837db8f5b9cdaff3f60fb34c9 (diff)
downloadbcm5719-llvm-078e984d8d8f05a525c3322a9adf49857d5b5f83.tar.gz
bcm5719-llvm-078e984d8d8f05a525c3322a9adf49857d5b5f83.zip
[libFuzzer] fail if the corpus dir does not exist
llvm-svn: 259454
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerIO.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerIO.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerIO.cpp b/llvm/lib/Fuzzer/FuzzerIO.cpp
index 043fad396d5..cc65876f241 100644
--- a/llvm/lib/Fuzzer/FuzzerIO.cpp
+++ b/llvm/lib/Fuzzer/FuzzerIO.cpp
@@ -32,7 +32,7 @@ static std::vector<std::string> ListFilesInDir(const std::string &Dir,
std::vector<std::string> V;
if (Epoch) {
auto E = GetEpoch(Dir);
- if (*Epoch >= E) return V;
+ if (E && *Epoch >= E) return V;
*Epoch = E;
}
DIR *D = opendir(Dir.c_str());
OpenPOWER on IntegriCloud