Closed
Description
The following program fails with the panic:
package main
import (
"fmt"
"net/mail"
)
func main() {
data := "\"\"@0"
addr, err := mail.ParseAddress(data)
if err != nil {
return
}
_, err = mail.ParseAddress(addr.String())
if err != nil {
fmt.Printf("failed to parse addr: %q -> %q\n", data, addr)
panic(err)
}
}
failed to parse addr: "\"\"@0" -> "<@0>"
panic: mail: invalid string
I guess that address should have not been parsed in the first place.
go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64