Skip to content

Commit

Permalink
proxy: fix reading uint
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Nov 25, 2021
1 parent dff7d75 commit beed5d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (c *cache) unpackItem(data []byte, req *dns.Msg) (ci *cacheItem, expired bo
ttl = uint32(expire - now)
}

l := int(binary.BigEndian.Uint32(b.Next(packedMsgLenSz)))
l := int(binary.BigEndian.Uint16(b.Next(packedMsgLenSz)))
if l == 0 {
return nil, expired
}
Expand Down

0 comments on commit beed5d5

Please sign in to comment.