go/src/mime
hopehook d61ae9ded4 mime/multipart: fix Reader.ReadForm(math.MaxInt64) overflow
Because "CopyN" will read one more byte, which will cause us
to overflow when calling "Reader.ReadForm(math.MaxInt64)".

So we should check if the parameter exceeds "math.MaxInt64"
to avoid returning no data.

Fixes #58384.

Change-Id: I30088ce6468176b21e4a9a0b8b6080f2986dda23
Reviewed-on: https://go-review.googlesource.com/c/go/+/467557
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: hopehook <hopehook@golangcn.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-02-28 17:49:22 +00:00
..
multipart mime/multipart: fix Reader.ReadForm(math.MaxInt64) overflow 2023-02-28 17:49:22 +00:00
quotedprintable mime: use strings.Builder 2022-09-06 17:36:47 +00:00
testdata
encodedword.go
encodedword_test.go
example_test.go
grammar.go
mediatype.go mime: allow duplicate media type parameters with equivalent values 2022-08-26 17:58:37 +00:00
mediatype_test.go mime: allow duplicate media type parameters with equivalent values 2022-08-26 17:58:37 +00:00
type.go
type_dragonfly.go
type_freebsd.go
type_openbsd.go
type_plan9.go
type_test.go
type_unix.go
type_unix_test.go
type_windows.go