mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Check that 'e' and 'n' are allocated in opensslrsa_fromdns
This commit is contained in:
@@ -692,6 +692,9 @@ opensslrsa_fromdns(dst_key_t *key, isc_buffer_t *data) {
|
||||
e = BN_bin2bn(r.base, e_bytes, NULL);
|
||||
isc_region_consume(&r, e_bytes);
|
||||
n = BN_bin2bn(r.base, r.length, NULL);
|
||||
if (e == NULL || n == NULL) {
|
||||
DST_RET(ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
key->key_size = BN_num_bits(n);
|
||||
|
||||
|
Reference in New Issue
Block a user