]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
store: check for NULL uri argument
authorPauli <paul.dale@oracle.com>
Wed, 22 Oct 2025 22:09:56 +0000 (09:09 +1100)
committerNeil Horman <nhorman@openssl.org>
Fri, 24 Oct 2025 22:07:18 +0000 (18:07 -0400)
Fixes #28978

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28980)

crypto/store/store_lib.c

index ebf170c3e8f1653a6e79fb06b3de443d0fc05a39..5d9601617cc5ac553f942eba234ba2636542b5e7 100644 (file)
@@ -77,6 +77,11 @@ OSSL_STORE_open_ex(const char *uri, OSSL_LIB_CTX *libctx, const char *propq,
     size_t schemes_n = 0;
     size_t i;
 
+    if (uri == NULL) {
+        ERR_raise(ERR_LIB_OSSL_STORE, CRYPTO_R_INVALID_NULL_ARGUMENT);
+        return 0;
+    }
+
     /*
      * Put the file scheme first.  If the uri does represent an existing file,
      * possible device name and all, then it should be loaded.  Only a failed