[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Paul I. Dale
pauli at openssl.org
Mon Sep 3 00:43:46 UTC 2018
The branch OpenSSL_1_0_2-stable has been updated
via 78ca7b7b319c7027310c56eaa05b8c295624a357 (commit)
from e24892ef83da5c363d39b52d0b459a26740b1ade (commit)
- Log -----------------------------------------------------------------
commit 78ca7b7b319c7027310c56eaa05b8c295624a357
Author: Pauli <paul.dale at oracle.com>
Date: Mon Sep 3 07:37:38 2018 +1000
Check the return from BN_sub() in BN_X931_generate_Xpq().
Reviewed-by: Tim Hudson <tjh at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7088)
(cherry picked from commit 6bcfcf16bf6aef4f9ec267d8b86ae1bffd8deab9)
-----------------------------------------------------------------------
Summary of changes:
crypto/bn/bn_x931p.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/crypto/bn/bn_x931p.c b/crypto/bn/bn_x931p.c
index f444af3..116620a 100644
--- a/crypto/bn/bn_x931p.c
+++ b/crypto/bn/bn_x931p.c
@@ -223,8 +223,10 @@ int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx)
for (i = 0; i < 1000; i++) {
if (!BN_rand(Xq, nbits, 1, 0))
goto err;
+
/* Check that |Xp - Xq| > 2^(nbits - 100) */
- BN_sub(t, Xp, Xq);
+ if (!BN_sub(t, Xp, Xq))
+ goto err;
if (BN_num_bits(t) > (nbits - 100))
break;
}
More information about the openssl-commits
mailing list