summaryrefslogtreecommitdiff
path: root/sbin/unwind/libunbound/validator/val_anchor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/unwind/libunbound/validator/val_anchor.c')
-rw-r--r--sbin/unwind/libunbound/validator/val_anchor.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/unwind/libunbound/validator/val_anchor.c b/sbin/unwind/libunbound/validator/val_anchor.c
index 9b6574c5d24..b1a54e1f019 100644
--- a/sbin/unwind/libunbound/validator/val_anchor.c
+++ b/sbin/unwind/libunbound/validator/val_anchor.c
@@ -971,7 +971,8 @@ anchors_dnskey_unsupported(struct trust_anchor* ta)
{
size_t i, num = 0;
for(i=0; i<ta->numDNSKEY; i++) {
- if(!dnskey_algo_is_supported(ta->dnskey_rrset, i))
+ if(!dnskey_algo_is_supported(ta->dnskey_rrset, i) ||
+ !dnskey_size_is_supported(ta->dnskey_rrset, i))
num++;
}
return num;
@@ -1048,6 +1049,10 @@ anchors_apply_cfg(struct val_anchors* anchors, struct config_file* cfg)
const char** zstr;
char* nm;
sldns_buffer* parsebuf = sldns_buffer_new(65535);
+ if(!parsebuf) {
+ log_err("malloc error in anchors_apply_cfg.");
+ return 0;
+ }
if(cfg->insecure_lan_zones) {
for(zstr = as112_zones; *zstr; zstr++) {
if(!anchor_insert_insecure(anchors, *zstr)) {