From: Bob Halley Date: Mon, 15 Sep 2025 19:19:29 +0000 (-0700) Subject: Avoid infinite recursion when unpickling an Answer [#1224] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14815e660934ac7cf5be19c19c0c87cc7f2fbfe6;p=thirdparty%2Fdnspython.git Avoid infinite recursion when unpickling an Answer [#1224] (cherry picked from commit 25ee91f0cea274d1836d2175c98e76af7c777fd6) --- diff --git a/dns/resolver.py b/dns/resolver.py index 923bb4b4..0c0790e5 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -283,7 +283,7 @@ class Answer: self.expiration = time.time() + self.chaining_result.minimum_ttl def __getattr__(self, attr): # pragma: no cover - if self.rrset is not None: + if attr != "rrset" and self.rrset is not None: if attr == "name": return self.rrset.name elif attr == "ttl":