plugin/minimal: Fixes a nil pointer dereference panic in minimal prefetch response processing (#8506)

* plugin/minimal: Fixes a nil pointer dereference panic in minimal prefetch response processing

This PR fixes a nil pointer dereference panic in minimal prefetch response processing

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix lint

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

---------

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang
2026-09-02 07:58:49 -07:00
committed by GitHub
parent a87f9efcc5
commit 88ab058ba2
2 changed files with 20 additions and 0 deletions

View File

@@ -26,6 +26,9 @@ func (m *minimalHandler) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *
if err != nil {
return rcode, err
}
if nw.Msg == nil {
return rcode, nil
}
ty, _ := response.Typify(nw.Msg, time.Now().UTC())
cl := response.Classify(ty)