mirror of
https://github.com/golang/go
synced 2024-11-12 07:10:22 -07:00
syscall: add some paranoia in Linux's Accept4
Fixes #7428 LGTM=r R=r CC=golang-codereviews https://golang.org/cl/69530044
This commit is contained in:
parent
dc6bf295b9
commit
0399b971d9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user