From ce7a2232f881e241515925bef13229656a0d6d58 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 12 Aug 2016 14:04:53 -0400 Subject: [PATCH] Check for bad filename in evp_test Thanks to Brian Carpter for reporting this. Reviewed-by: Dr. Stephen Henson --- test/evp_test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/evp_test.c b/test/evp_test.c index f820e2537d..a0dbffb2da 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -559,6 +559,10 @@ int main(int argc, char **argv) memset(&t, 0, sizeof(t)); t.start_line = -1; in = BIO_new_file(argv[1], "r"); + if (in == NULL) { + fprintf(stderr, "Can't open %s for reading\n", argv[1]); + return 1; + } t.in = in; while (BIO_gets(in, buf, sizeof(buf))) { t.line++; -- 2.25.1