mirror of
https://github.com/golang/net.git
synced 2026-03-31 02:17:08 +09:00
The existing implementation of the Name.unpack method does not check the length of the domain name until parsing is complete. This allows a malicious user to supply an unreasonably large name and wastle cycles parsing. This change moves an equivalent check into the loop during process to short-circuit if we've created too large of a name. For golang/go#77540 Change-Id: I4c4bf20c0342825a09cefd9b0b3c0bdce0c80137 Reviewed-on: https://go-review.googlesource.com/c/net/+/750260 Reviewed-by: Roland Shoemaker <roland@golang.org> Auto-Submit: Roland Shoemaker <roland@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>