diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-02-01 15:15:43 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-02-03 12:09:44 +0100 |
commit | 28e1904250183c25faad1744fead96f205559270 (patch) | |
tree | b354920ba57758c780006cd983799f83c9cba65c | |
parent | 963a65bfb41562909d1800339f7b1e3cfc0a39bf (diff) |
apps/ecparam: Avoid crash when parameters fail to load
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14043)
-rw-r--r-- | apps/ecparam.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/ecparam.c b/apps/ecparam.c index 33b24781e3..762da3f2c9 100644 --- a/apps/ecparam.c +++ b/apps/ecparam.c @@ -238,7 +238,7 @@ int ecparam_main(int argc, char **argv) } } else { params_key = load_keyparams(infile, 1, "EC", "EC parameters"); - if (!EVP_PKEY_is_a(params_key, "EC")) + if (params_key == NULL || !EVP_PKEY_is_a(params_key, "EC")) goto end; if (point_format && !EVP_PKEY_set_utf8_string_param( |