Make CodeQL happy (#2294)

This commit is contained in:
lifenjoiner 2023-02-03 23:22:32 +08:00 committed by GitHub
parent 470460f069
commit e1c7ea1770
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 {