]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.15] syscall: do not overflow key memory in GetQueuedCompletionStatus
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 23 Feb 2021 12:29:40 +0000 (13:29 +0100)
committerDmitri Shuralyov <dmitshur@golang.org>
Mon, 1 Mar 2021 21:33:25 +0000 (21:33 +0000)
commit4fda89d4201fc9f0c1e192bbcc95dd8d660e9122
treeebe077ae5b7870902dcecb7512ddad4ab0cc21b6
parentd9b4ef591c2b058004545eccf10a538aa7597adb
[release-branch.go1.15] syscall: do not overflow key memory in GetQueuedCompletionStatus

The third argument to GetQueuedCompletionStatus is a pointer to a
uintptr, not a uint32. Users of this functions have therefore been
corrupting their memory every time they used it. Either that memory
corruption was silent (dangerous), or their programs didn't work so they
chose a different API to use.

This fixes the problem by passing through an intermediate buffer.

Updates #44538.
Fixes #44592.

Change-Id: Icacd71f705b36e41e52bd8c4d74898559a27522f
Reviewed-on: https://go-review.googlesource.com/c/go/+/296151
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/syscall/syscall_windows.go
src/syscall/zsyscall_windows.go