mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 12:13:20 -04:00
Check BN_dup results in rsa_check
(cherry picked from commit a47235f4f5)
This commit is contained in:
parent
6b37a69213
commit
9f8eadd289
1 changed files with 9 additions and 0 deletions
|
|
@ -991,6 +991,9 @@ rsa_check(RSA *rsa, RSA *pub) {
|
|||
}
|
||||
} else {
|
||||
n = BN_dup(n2);
|
||||
if (n == NULL) {
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
}
|
||||
if (e1 != NULL) {
|
||||
if (BN_cmp(e1, e2) != 0) {
|
||||
|
|
@ -1001,6 +1004,12 @@ rsa_check(RSA *rsa, RSA *pub) {
|
|||
}
|
||||
} else {
|
||||
e = BN_dup(e2);
|
||||
if (e == NULL) {
|
||||
if (n != NULL) {
|
||||
BN_free(n);
|
||||
}
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
}
|
||||
if (RSA_set0_key(rsa, n, e, NULL) == 0) {
|
||||
if (n != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue