]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ensure suffix is always valid in bin/tests/system/qmin/ans4/ans.py
authorMark Andrews <marka@isc.org>
Mon, 18 Jul 2022 23:57:47 +0000 (09:57 +1000)
committerMark Andrews <marka@isc.org>
Wed, 27 Jul 2022 18:27:26 +0000 (14:27 -0400)
initalise suffix to ""

    170        r.answer.append(
    171            dns.rrset.from_text(
    172                lqname + suffix, 1, IN, NS, "a.bit.longer.ns.name." + suffix
    173            )
    174        )
    175        r.flags |= dns.flags.AA
           15. Condition endswith(lqname, "icky.ptang.zoop.boing."), taking true branch.
    176    elif endswith(lqname, "icky.ptang.zoop.boing."):
           CID 350722 (#7 of 7): Bad use of null-like value (FORWARD_NULL)
           16. invalid_operation: Invalid operation on null-like value suffix.
    177        r.authority.append(
    178            dns.rrset.from_text(
    179                "icky.ptang.zoop.boing." + suffix,
    180                1,
    181                IN,
    182                SOA,
    183                "ns2." + suffix + " hostmaster.arpa. 2018050100 1 1 1 1",
    184            )
    185        )

(cherry picked from commit eb798d047849aa28b0b0f14379a8e264dfa41c7f)

bin/tests/system/qmin/ans4/ans.py

index a4cc13c656e159b6b6fb6b919a442b2f5ea867ca..f3d00c351402d0d8f3d2b0d6a9d5159abac8c62d 100755 (executable)
@@ -58,6 +58,7 @@ def create_response(msg):
     qname = m.question[0].name.to_text()
     lqname = qname.lower()
     labels = lqname.split(".")
+    suffix = ""
 
     # get qtype
     rrtype = m.question[0].rdtype