aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-09-16 19:38:05 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-09-23 15:29:18 +0200
commit866a764aa7c16ff417c6226b9a0d3ce369d394b4 (patch)
tree527668dfac6c929b1509a59e006dfb43b8ed0e5e
parentfirewall: remove unused wrappers (diff)
downloadwireguard-windows-866a764aa7c16ff417c6226b9a0d3ce369d394b4.tar.xz
wireguard-windows-866a764aa7c16ff417c6226b9a0d3ce369d394b4.zip
updater: use correct length for security attributes
-rw-r--r--updater/msirunner_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/updater/msirunner_windows.go b/updater/msirunner_windows.go
index 62ec1cdf..6b8ae476 100644
--- a/updater/msirunner_windows.go
+++ b/updater/msirunner_windows.go
@@ -66,7 +66,7 @@ func msiTempFile() (*os.File, error) {
return nil, err
}
sa := &windows.SecurityAttributes{
- Length: uint32(len(sd)),
+ Length: uint32(unsafe.Sizeof(windows.SecurityAttributes{})),
SecurityDescriptor: uintptr(unsafe.Pointer(&sd[0])),
}
// TODO: os.TempDir() returns C:\windows\temp when calling from this context. Supposedly this is mostly secure