From 8c315b06e0ae0f71495e5a6548492b7ac4ea04ea Mon Sep 17 00:00:00 2001 From: Pauli Date: Thu, 23 Oct 2025 09:09:56 +1100 Subject: [PATCH] store: check for NULL uri argument MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes #28978 Reviewed-by: Neil Horman Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/28980) (cherry picked from commit e9e643bc580e4ba0c6f8f9b4dd2ce59397b1b786) --- crypto/store/store_lib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c index ebf170c3e8f..5d9601617cc 100644 --- a/crypto/store/store_lib.c +++ b/crypto/store/store_lib.c @@ -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 -- 2.47.3