Commit e6343c87bf for openssl.org

commit e6343c87bf1fe99fcf236e65c7e13ef1946a278e
Author: Norbert Pocs <norbertp@openssl.org>
Date:   Wed Sep 2 08:25:48 2026 +0200

    Dereference variable after NULL check

    Fixes coverity issue 1700802

    Signed-off-by: Norbert Pocs <norbertp@openssl.org>
    Reviewed-by: Paul Dale <paul.dale@oracle.com>
    Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
    Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
    Merge-date: Fri Sep  4 13:32:42 2026
    Merged-from: https://github.com/openssl/openssl/pull/32637

diff --git a/crypto/rsa/rsa_acvp_test_params.c b/crypto/rsa/rsa_acvp_test_params.c
index 8fefbddaaf..c7a6b626de 100644
--- a/crypto/rsa/rsa_acvp_test_params.c
+++ b/crypto/rsa/rsa_acvp_test_params.c
@@ -18,10 +18,6 @@ int ossl_rsa_acvp_test_gen_params_new_parsed(OSSL_PARAM **dst,
     const RSA_PARAMS *params)
 {
     OSSL_PARAM *d, *alloc = NULL;
-    const OSSL_PARAM *src[] = {
-        params->fips.xp, params->fips.xp1, params->fips.xp2,
-        params->fips.xq, params->fips.xq1, params->fips.xq2
-    };
     size_t i;
     int ret = 1;

@@ -38,6 +34,11 @@ int ossl_rsa_acvp_test_gen_params_new_parsed(OSSL_PARAM **dst,
     if (dst == NULL || params == NULL)
         return 0;

+    const OSSL_PARAM *src[] = {
+        params->fips.xp, params->fips.xp1, params->fips.xp2,
+        params->fips.xq, params->fips.xq1, params->fips.xq2
+    };
+
     /* Xp is required whenever the ACVP test interface is used. */
     if (src[0] == NULL)
         return 1;