]> Cypherpunks repositories - gostls13.git/commit
multipart: fixes problem parsing mime/multipart of certain lengths
authorFrancisco Claude <fclaude@recoded.cl>
Wed, 16 Sep 2015 15:56:06 +0000 (12:56 -0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 24 Sep 2015 09:00:52 +0000 (09:00 +0000)
commit8560ead38a78ba9d8e3c482014654023881753e3
treeecbd9cf4ded769ad35ef3ace1da87fa3e42ceb85
parentd1b1487a64be2e3bcd882d03f909c4617403c43d
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>
src/mime/multipart/multipart.go
src/mime/multipart/multipart_test.go