From e1c7ea17702860083a2f3ce878f3454d5f864f35 Mon Sep 17 00:00:00 2001 From: lifenjoiner Date: Fri, 3 Feb 2023 23:22:32 +0800 Subject: [PATCH] Make CodeQL happy (#2294) --- dnscrypt-proxy/xtransport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnscrypt-proxy/xtransport.go b/dnscrypt-proxy/xtransport.go index 21bc707e..28e5094a 100644 --- a/dnscrypt-proxy/xtransport.go +++ b/dnscrypt-proxy/xtransport.go @@ -503,7 +503,7 @@ func (xTransport *XTransport) Fetch( if xTransport.h3Transport != nil && !hasAltSupport { if alt, found := resp.Header["Alt-Svc"]; found { dlog.Debugf("Alt-Svc [%s]: [%s]", url.Host, alt) - altPort := uint16(port) + altPort := uint16(port & 0xffff) for i, xalt := range alt { for j, v := range strings.Split(xalt, ";") { if i > 8 || j > 16 {