From: Pauli Date: Wed, 22 Oct 2025 22:09:56 +0000 (+1100) Subject: store: check for NULL uri argument X-Git-Tag: 3.0-PRE-CLANG-FORMAT-WEBKIT~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2cbdab29d504006efc5ea97ec1126aa3d5fb06d;p=thirdparty%2Fopenssl.git store: check for NULL uri argument 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) --- diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c index b81d3982c56..510d7d9f5b0 100644 --- a/crypto/store/store_lib.c +++ b/crypto/store/store_lib.c @@ -76,6 +76,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