Coverity 1463571: Null pointer dereferences (FORWARD_NULL)
authorPauli <paul.dale@oracle.com>
Thu, 21 May 2020 03:44:01 +0000 (13:44 +1000)
committerPauli <paul.dale@oracle.com>
Fri, 22 May 2020 07:23:49 +0000 (17:23 +1000)
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/11892)

providers/implementations/keymgmt/rsa_kmgmt.c

index b237b27..3091c1d 100644 (file)
@@ -411,8 +411,8 @@ static void *gen_init(void *provctx, int selection, int rsa_type)
         } else {
             gctx->nbits = 2048;
             gctx->primes = RSA_DEFAULT_PRIME_NUM;
+            gctx->rsa_type = rsa_type;
         }
-        gctx->rsa_type = rsa_type;
     }
     return gctx;
 }