From: Rich Salz Date: Fri, 12 Aug 2016 18:04:53 +0000 (-0400) Subject: Check for bad filename in evp_test X-Git-Tag: OpenSSL_1_1_0~219 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ce7a2232f881e241515925bef13229656a0d6d58;p=oweals%2Fopenssl.git Check for bad filename in evp_test Thanks to Brian Carpter for reporting this. Reviewed-by: Dr. Stephen Henson --- 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++;