mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-07 04:24:05 +09:00
net/netstat: remove a bit more unsafe
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
1 parent
c8939ab7c7
commit
5d96ecd5e6
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user