We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1b571d commit e4a7e0dCopy full SHA for e4a7e0d
deps/openssl/openssl/crypto/dh/dh_key.c
@@ -78,10 +78,15 @@ static int generate_key(DH *dh)
78
int ok = 0;
79
int generate_new_key = 0;
80
unsigned l;
81
- BN_CTX *ctx;
+ BN_CTX *ctx = NULL;
82
BN_MONT_CTX *mont = NULL;
83
BIGNUM *pub_key = NULL, *priv_key = NULL;
84
85
+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
86
+ DHerr(DH_F_GENERATE_KEY, DH_R_MODULUS_TOO_LARGE);
87
+ return 0;
88
+ }
89
+
90
ctx = BN_CTX_new();
91
if (ctx == NULL)
92
goto err;
0 commit comments