Commit 4185261efc for openssl.org
commit 4185261efce35a08a581f7ba62bf3ee1a4fdfea7
Author: Frederik Wedel-Heinen <frederik.wedel-heinen@dencrypt.dk>
Date: Fri Jan 2 18:36:39 2026 +0100
Fix possible null pointer dereference.
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/29537)
diff --git a/test/tls-provider.c b/test/tls-provider.c
index bbc3168941..0a9da8ae86 100644
--- a/test/tls-provider.c
+++ b/test/tls-provider.c
@@ -3227,6 +3227,11 @@ int tls_provider_init(const OSSL_CORE_HANDLE *handle,
}
}
+ if (c_obj_create == NULL || c_obj_add_sigid == NULL) {
+ ERR_raise(ERR_LIB_USER, XORPROV_R_OBJ_CREATE_ERR);
+ goto err;
+ }
+
/*
* Register algorithms manually as add_provider_sigalgs is
* only called during session establishment -- too late for