summaryrefslogtreecommitdiffhomepage
path: root/tun
diff options
context:
space:
mode:
Diffstat (limited to 'tun')
-rw-r--r--tun/wintun/namespace_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/wintun/namespace_windows.go b/tun/wintun/namespace_windows.go
index 01fff91..de781a5 100644
--- a/tun/wintun/namespace_windows.go
+++ b/tun/wintun/namespace_windows.go
@@ -37,7 +37,7 @@ func initializeNamespace() error {
return fmt.Errorf("SddlToSecurityDescriptor failed: %v", err)
}
wintunObjectSecurityAttributes = &windows.SecurityAttributes{
- Length: uint32(len(sd)),
+ Length: uint32(unsafe.Sizeof(windows.SecurityAttributes{})),
SecurityDescriptor: uintptr(unsafe.Pointer(&sd[0])),
}
sid, err := windows.CreateWellKnownSid(windows.WinLocalSystemSid)