aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-10-23 19:31:04 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2019-10-23 19:31:04 +0000
commit7df3ee6deecd8ead3d13345f29646e4c4565a65f (patch)
tree0e32189bdb828eea1c9f5d0b5011591ee857a19d
parentmod: bump (diff)
downloadwireguard-windows-master.tar.xz
wireguard-windows-master.zip
elevate: do not invoke shell execute if program is emptyHEADmaster
-rw-r--r--elevate/shellexecute.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/elevate/shellexecute.go b/elevate/shellexecute.go
index 8e238f08..2f084efe 100644
--- a/elevate/shellexecute.go
+++ b/elevate/shellexecute.go
@@ -132,6 +132,10 @@ func ShellExecute(program string, arguments string, directory string, show int32
defer syscall.Syscall((*interfacePointer)[releaseOffset], 1, uintptr(unsafe.Pointer(interfacePointer)), 0, 0)
+ if program16 == nil {
+ return
+ }
+
if ret, _, _ := syscall.Syscall6((*interfacePointer)[shellExecuteOffset], 6,
uintptr(unsafe.Pointer(interfacePointer)),
uintptr(unsafe.Pointer(program16)),