diff --git a/CHANGES b/CHANGES index 163473a809..b42c6d4ec2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4016. [bug] Fix a dig segfault due to bad linked list usage. + [RT #37591] + 4015. [bug] Nameservers that are skipped due to them being CNAMEs were not being logged. They are now logged to category 'cname' as per BIND 8. [RT #37935] diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 79f6d89e31..24c168da22 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -2977,7 +2977,8 @@ connect_done(isc_task_t *task, isc_event_t *event) { query->waiting_connect = ISC_FALSE; isc_event_free(&event); l = query->lookup; - if (l->current_query != NULL) + if ((l->current_query != NULL) && + (ISC_LINK_LINKED(l->current_query, link))) next = ISC_LIST_NEXT(l->current_query, link); else next = NULL;