]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
ssl_do_config(): Check for NULL name argument
authorAlexandr Nedvedicky <sashan@openssl.org>
Thu, 4 Dec 2025 07:38:04 +0000 (08:38 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 5 Dec 2025 16:28:32 +0000 (17:28 +0100)
Fixes 0c2a196af8ab9c12da27

Fixes Coverity issue 1675312

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29306)

ssl/ssl_mcnf.c

index 7bb69d90b80c20f91eae5ccfa5a732fc99f10f73..b552d103a7f99e38fddd49970b2c54dd6eb3de77 100644 (file)
@@ -52,6 +52,12 @@ static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name, int system)
     if (name == NULL && system)
         name = "system_default";
 
+    if (name == NULL) {
+        ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
+                       "name not specified (name == NULL)");
+        goto err;
+    }
+
     libctx = s != NULL ? s->ctx->libctx: ctx->libctx;
     imod = ssl_do_lookup_module(libctx);
     if (!conf_ssl_name_find(imod, name, &idx)) {