From 10a3d4dca96b5814d69249da5a76c6c2eae714a0 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Tue, 9 Apr 2019 18:01:49 -0700 Subject: [PATCH] [fuzzer] Make the regression_driver work while fuzzers are active --- tests/fuzz/regression_driver.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/fuzz/regression_driver.c b/tests/fuzz/regression_driver.c index 1553d436..658c685f 100644 --- a/tests/fuzz/regression_driver.c +++ b/tests/fuzz/regression_driver.c @@ -40,8 +40,13 @@ int main(int argc, char const **argv) { size_t readSize; FILE *file; - /* Check that it is a regular file, and that the fileSize is valid */ - FUZZ_ASSERT_MSG(UTIL_isRegularFile(fileName), fileName); + /* Check that it is a regular file, and that the fileSize is valid. + * If it is not a regular file, then it may have been deleted since we + * constructed the list, so just skip it. + */ + if (!UTIL_isRegularFile(fileName)) { + continue; + } FUZZ_ASSERT_MSG(fileSize <= kMaxFileSize, fileName); /* Ensure we have a large enough buffer allocated */ if (fileSize > bufferSize) {