Commit 18941a75 authored by Ian Lance Taylor's avatar Ian Lance Taylor

syscall: Correct length of SockaddrUnix.

R=rsc
CC=golang-dev
https://golang.org/cl/4025041
parent 157cd6ef
......@@ -257,8 +257,8 @@ func (sa *SockaddrUnix) sockaddr() (uintptr, _Socklen, int) {
sa.raw.Path[0] = 0
}
// length is family, name, NUL.
return uintptr(unsafe.Pointer(&sa.raw)), 1 + _Socklen(n) + 1, 0
// length is family (uint16), name, NUL.
return uintptr(unsafe.Pointer(&sa.raw)), 2 + _Socklen(n) + 1, 0
}
type SockaddrLinklayer struct {
......
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