diff options
author | Pauli <paul.dale@oracle.com> | 2019-11-21 13:50:03 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-11-22 15:24:13 +1000 |
commit | b4378fd6a250cd4c57d78e6df48ef5c0ca08ed86 (patch) | |
tree | d1b30ebf41108cc8a2fb98ef5ecaf3ab85855d6c /apps | |
parent | 328fd8833395b95bf0b07490b008c1dc927ce362 (diff) |
main: avoid a NULL dereference on initialisation.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10495)
(cherry picked from commit acc7b9fb5c162c2ca522e5e1e09d1efbde8dc6a0)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/openssl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/openssl.c b/apps/openssl.c index 9648f35b02..ff7b759a40 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -164,6 +164,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 */ |