summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-11-21 13:50:03 +1000
committerPauli <paul.dale@oracle.com>2019-11-22 15:22:57 +1000
commitacc7b9fb5c162c2ca522e5e1e09d1efbde8dc6a0 (patch)
treef2a2e4b17d95c4a7b6fc8b931402ee65fea1bf77 /apps
parenta89befba602353ff2fc83ba7037eb91307b2cb21 (diff)
main: avoid a NULL dereference on initialisation.
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10495)
Diffstat (limited to 'apps')
-rw-r--r--apps/openssl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/openssl.c b/apps/openssl.c
index 66189ca434..31f598815a 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -276,6 +276,13 @@ int main(int argc, char *argv[])
}
prog = prog_init();
+ if (prog == NULL) {
+ BIO_printf(bio_err,
+ "FATAL: Startup failure (dev note: prog_init() failed)\n");
+ ERR_print_errors(bio_err);
+ ret = 1;
+ goto end;
+ }
pname = opt_progname(argv[0]);
/* first check the program name */