Closed nak3 closed 8 years ago
func (h *reqHeader) offset() int64 { const maxInt64 = (^uint64(0) >> 1) + 1 if u := binary.BigEndian.Uint64(h[16:24]); u <= maxInt64 { return int64(u) }
This has a possibility of overflow int64(u). https://play.golang.org/p/neAeW9UC9c
int64(u)
This has a possibility of overflow
int64(u)
. https://play.golang.org/p/neAeW9UC9c