diff options
author | Rich Salz <rsalz@openssl.org> | 2016-08-12 14:04:53 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-08-12 14:04:53 -0400 |
commit | ce7a2232f881e241515925bef13229656a0d6d58 (patch) | |
tree | 670088745412cffa2a5a9bdb3a11ad9a94fb838a /test/evp_test.c | |
parent | 721f3980236c397b0011088477f4568ac5f24cae (diff) |
Check for bad filename in evp_test
Thanks to Brian Carpter for reporting this.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Diffstat (limited to 'test/evp_test.c')
-rw-r--r-- | test/evp_test.c | 4 |
1 files changed, 4 insertions, 0 deletions
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++; |