From 8a28dc9c7dca5d12d1ae89c744868990dd5c745a Mon Sep 17 00:00:00 2001 From: andreyrusanov-ec Date: Sun, 12 Apr 2026 11:34:23 +0300 Subject: [PATCH] fix(dnssec) TestDelegationUnSigned: Potential nil pointer dereference (#8042) Signed-off-by: Andrey Rusanov --- plugin/dnssec/dnssec_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/dnssec/dnssec_test.go b/plugin/dnssec/dnssec_test.go index 2764398de..ac4bc11d2 100644 --- a/plugin/dnssec/dnssec_test.go +++ b/plugin/dnssec/dnssec_test.go @@ -169,7 +169,10 @@ func TestDelegationUnSigned(t *testing.T) { } } if nsec == nil { - t.Error("Authority section should hold a NSEC record") + t.Fatal("Authority section should hold a NSEC record") + } + if rrsig == nil { + t.Fatal("Authority section should hold a RRSIG record") } if rrsig.TypeCovered != dns.TypeNSEC { t.Errorf("RRSIG should cover type %s, got %s",