Repository navigation
Conversation
|
This PR (HEAD: bcaa3cd) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/848187. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/848187. |
newFileFD accepts any socket whose local address is an IPv4, IPv6 or Unix address, but (*netFD).addrFunc only maps the socket types this package supports and returns a nil Addr for any other. newFileFD then dereferenced that nil Addr, so FileConn, FileListener and FilePacketConn crashed the program when given, for example, an SCTP SOCK_SEQPACKET socket. Return EPROTONOSUPPORT instead, as newFileFD already does for an address family it does not support. Fixes golang#82051
bcaa3cd to
cc54def
Compare
|
This PR (HEAD: cc54def) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/848187. Important tips:
|
newFileFD accepts any socket whose local address is an IPv4, IPv6 or
Unix address, but (*netFD).addrFunc only maps the socket types this
package supports and returns a nil Addr for any other. newFileFD then
dereferenced that nil Addr, so FileConn, FileListener and
FilePacketConn crashed the program when given, for example, an SCTP
SOCK_SEQPACKET socket.
Return EPROTONOSUPPORT instead, as newFileFD already does for an
address family it does not support.
Fixes #82051