From: Evan Hunt Date: Thu, 14 Aug 2025 06:11:29 +0000 (-0700) Subject: result could be set incorrectly in validated() X-Git-Tag: v9.21.12~46^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70e99bb27a925e8b303e9177715a6b4a15f04388;p=thirdparty%2Fbind9.git result could be set incorrectly in validated() during a recent refactoring of validated(), a line was removed, causing 'result' to be left unchanged. this wasted time continuing to try to validate when a non-recoverable error had occured, and caused the wrong reason to be logged in add_bad(). --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 3d1fb3e1472..546a6ee2e84 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -5435,8 +5435,8 @@ validated(void *arg) { FCTXTRACE("validation failed"); inc_stats(res, dns_resstatscounter_valfail); fctx->valfail++; - fctx->vresult = val->result; - if (fctx->vresult != DNS_R_BROKENCHAIN) { + result = fctx->vresult = val->result; + if (result != DNS_R_BROKENCHAIN) { if (val->rdataset != NULL) { delete_rrset(fctx, val->name, val->type, val->sigrdataset != NULL);