diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2023-02-01 15:34:19 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-02-08 17:05:47 +0100 |
commit | 13cb5416f4dbbf50690fe129894e2856623af21c (patch) | |
tree | eaa57cc941c666c9202219b951ce77ba950c3d81 /test/testutil | |
parent | 826374921a6b92293fd87655416eda8ef07301c8 (diff) | |
download | openssl-13cb5416f4dbbf50690fe129894e2856623af21c.zip openssl-13cb5416f4dbbf50690fe129894e2856623af21c.tar.gz openssl-13cb5416f4dbbf50690fe129894e2856623af21c.tar.bz2 |
test_get_libctx(): prevent crash when called with NULL provider arg
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20190)
Diffstat (limited to 'test/testutil')
-rw-r--r-- | test/testutil/provider.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/testutil/provider.c b/test/testutil/provider.c index 199e4f0..900324d 100644 --- a/test/testutil/provider.c +++ b/test/testutil/provider.c @@ -38,7 +38,7 @@ int test_get_libctx(OSSL_LIB_CTX **libctx, OSSL_PROVIDER **default_null_prov, goto err; } - if (module_name != NULL + if (provider != NULL && module_name != NULL && (*provider = OSSL_PROVIDER_load(new_libctx, module_name)) == NULL) { opt_printf_stderr("Failed to load provider %s\n", module_name); goto err; |