You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mime/multipart package does not impose line length limits. Maliciously crafted
messages will cause bufio to allocate memory in infinite loop.
In general, bufio.ReadString('\n') should not be used against untrusted input. Its uses
should be rewritten to use the recently added encoding/line package.
package main
ipackage main
import (
"mime/multipart"
"os"
)
type malicious struct{}
func (malicious) Read(b []byte) (n int, err os.Error) {
return len(b), nil
}
func main() {
r := multipart.NewReader(&malicious{}, "fooBoundary")
r.NextPart()
}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: