Coverity 1458438: fix uninitialised memory access.
authorPauli <paul.dale@oracle.com>
Sun, 16 Feb 2020 08:02:03 +0000 (18:02 +1000)
committerPauli <paul.dale@oracle.com>
Mon, 17 Feb 2020 09:29:05 +0000 (19:29 +1000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11101)

test/ffc_internal_test.c

index 4aa23944aff325d6e5a0483015e5130f939dfe93..e74dc1bd0f22ccc82fdd373884fee3d91879d00e 100644 (file)
@@ -393,9 +393,9 @@ static int ffc_params_fips186_2_gen_validate_test(void)
     FFC_PARAMS params;
     BIGNUM *bn = NULL;
 
+    ffc_params_init(&params);
     if (!TEST_ptr(bn = BN_new()))
         goto err;
-    ffc_params_init(&params);
     if (!TEST_true(ffc_params_FIPS186_2_generate(NULL, &params, FFC_PARAM_TYPE_DH,
                                                  1024, 160, NULL, &res, NULL)))
         goto err;