coverity 1462561 Uninitialized scalar variable
authorPauli <paul.dale@oracle.com>
Sun, 26 Apr 2020 22:57:38 +0000 (08:57 +1000)
committerPauli <paul.dale@oracle.com>
Thu, 30 Apr 2020 10:21:32 +0000 (20:21 +1000)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)

crypto/rsa/rsa_gen.c

index 3d5a32a0a1224b80c1e8b0c5b8ef9e4ece4758d1..5712aa1791b973d6a57b688a5b8036fad26b53fe 100644 (file)
@@ -463,7 +463,7 @@ static int rsa_keygen_pairwise_test(RSA *rsa, OSSL_CALLBACK *cb, void *cbarg)
     if (ciphertxt_len <= 0)
         goto err;
     if (ciphertxt_len == plaintxt_len
-        && memcmp(decoded, plaintxt, plaintxt_len) == 0)
+        && memcmp(ciphertxt, plaintxt, plaintxt_len) == 0)
         goto err;
 
     OSSL_SELF_TEST_oncorrupt_byte(st, ciphertxt);