net/netstat: remove a bit more unsafe

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/946/head
Brad Fitzpatrick 4 years ago committed by Brad Fitzpatrick
parent c8939ab7c7
commit 5d96ecd5e6

@ -93,7 +93,7 @@ func (t *Table) addEntries(fam int) error {
}
buf = buf[:size]
numEntries := *(*uint32)(unsafe.Pointer(&buf[0]))
numEntries := endian.Native.Uint32(buf[:4])
buf = buf[4:]
var recSize int

Loading…
Cancel
Save