diff --git a/lib/dns/rdata/in_1/apl_42.c b/lib/dns/rdata/in_1/apl_42.c index 67c021062b..ee33fa5c57 100644 --- a/lib/dns/rdata/in_1/apl_42.c +++ b/lib/dns/rdata/in_1/apl_42.c @@ -327,7 +327,7 @@ dns_rdata_apl_first(dns_rdata_in_apl_t *apl) { /* * If no APL return ISC_R_NOMORE. */ - if (apl->apl == NULL) { + if (apl->apl == NULL || apl->apl_len == 0) { return ISC_R_NOMORE; }