diff options
| author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-09-18 00:10:07 -0600 |
|---|---|---|
| committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-09-19 04:46:17 +0000 |
| commit | 62fb079e2b374d0e64f5432191f53cecd5282f6b (patch) | |
| tree | b93f94e9079de1509852e645187d04c0ab136298 /src/syscall/exec_linux_test.go | |
| parent | fa42157d986c69664e2146b520ff45be204af8eb (diff) | |
| download | go-62fb079e2b374d0e64f5432191f53cecd5282f6b.tar.xz | |
syscall: avoid memory corruption in mksyscall_windows.go with *bool parameters
Windows type PBOOL is a pointer to a 4 byte value, where 0 means false
and not-0 means true. That means we should use uint32 here, not bool,
since Go bools can be 1 byte. Since a *bool is never a "real" valid
Windows type, converting on both in and out is probably sufficient,
since *bool shouldn't ever be used as something with significance for
its particular address.
Updates: #34364
Change-Id: I4c1b91cd9a39d91e23dae6f894b9a49f7fba2c0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/196122
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/syscall/exec_linux_test.go')
0 files changed, 0 insertions, 0 deletions
