microsoft / go-winio

Win32 IO-related utilities for Go
MIT License
939 stars 181 forks source link

sd.go: fix calculation of security descriptor length in SddlToSecurit… #299

Closed dblohm7 closed 11 months ago

dblohm7 commented 11 months ago

…yDescriptor

unsafe.Sizeof(windows.SECURITY_DESCRIPTOR{}) is the minimum length of the SD, not the actual length. Use the actual length for computing the length of the slice.

This path also removes getSecurityDescriptorLength, which is no longer used.

dblohm7 commented 11 months ago

@microsoft-github-policy-service agree company="Tailscale Inc."