]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.5] multipart: fixes problem parsing mime/multipart of certain...
authorFrancisco Claude <fclaude@recoded.cl>
Wed, 16 Sep 2015 15:56:06 +0000 (12:56 -0300)
committerAustin Clements <austin@google.com>
Tue, 17 Nov 2015 02:20:49 +0000 (02:20 +0000)
commit36fe6f2d5d242d5097b7a3f1a95e8b5457914840
tree99732532472aac7a7cf46d77191b1d966890cb92
parent6a18122614608c597511c2cc188ef771e393f1fb
[release-branch.go1.5] multipart: fixes problem parsing mime/multipart of certain lengths

When parsing the multipart data, if the delimiter appears but doesn't
finish with -- or \n or \r\n, it assumes the data can be consumed. This
is incorrect when the peeking buffer finishes with --delimiter-

Fixes #12662

Change-Id: I329556a9a206407c0958289bf7a9009229120bb9
Reviewed-on: https://go-review.googlesource.com/14652
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/16969
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/mime/multipart/multipart.go
src/mime/multipart/multipart_test.go