From: Bob Beck Date: Wed, 18 Feb 2026 16:55:17 +0000 (-0700) Subject: Fix misplaced check spotted by vitkor X-Git-Tag: openssl-4.0.0-alpha1~170 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4553c792c3954fb0ec8d405677cd0591027d3e58;p=thirdparty%2Fopenssl.git Fix misplaced check spotted by vitkor Reviewed-by: Neil Horman Reviewed-by: Viktor Dukhovni MergeDate: Tue Feb 24 14:04:45 2026 (Merged from https://github.com/openssl/openssl/pull/29612) --- diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c index ddf1a923fc9..54cef44f591 100644 --- a/crypto/x509/x509_vpm.c +++ b/crypto/x509/x509_vpm.c @@ -844,13 +844,13 @@ static const unsigned char *int_X509_VERIFY_PARAM_get0_ip(X509_VERIFY_PARAM *par if (idx > INT_MAX) return NULL; - buf = sk_X509_BUFFER_value(param->ips, (int)idx); - if (param == NULL || param->ips == NULL) { ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER); return NULL; } + buf = sk_X509_BUFFER_value(param->ips, (int)idx); + if (buf != NULL) { if (plen != NULL) *plen = buf->len;