Skip non-existing files.
authorKurt Roeckx <kurt@roeckx.be>
Sat, 16 Jul 2016 19:45:34 +0000 (21:45 +0200)
committerKurt Roeckx <kurt@roeckx.be>
Tue, 26 Jul 2016 19:01:05 +0000 (21:01 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #1324

fuzz/test-corpus.c

index ccad369fafe837bf11086fd7634e809222e0b458..c553697d6c78aac43e0ae75af347aa1950c85505 100644 (file)
@@ -33,6 +33,8 @@ int main(int argc, char **argv) {
 
         stat(argv[n], &st);
         f = fopen(argv[n], "rb");
+        if (f == NULL)
+            continue;
         buf = malloc(st.st_size);
         s = fread(buf, 1, st.st_size, f);
         OPENSSL_assert(s == (size_t)st.st_size);