Commit 0399b971 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

syscall: add some paranoia in Linux's Accept4

Fixes #7428

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/69530044
parent dc6bf295
......@@ -420,6 +420,9 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
if err != nil {
return
}
if len > SizeofSockaddrAny {
panic("RawSockaddrAny too small")
}
sa, err = anyToSockaddr(&rsa)
if err != nil {
Close(nfd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment