From ca1b3fe235ca617c4128fcc00d924e85535b4b8e Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Mon, 22 Nov 2021 11:49:12 -0800 Subject: [PATCH] net/tshttpproxy: use correct size for Windows BOOL argument The Windows BOOL type is an int32. We were using a bool, which is a one byte wide. This could be responsible for the ERROR_INVALID_PARAMETER errors we were seeing for calls to WinHttpGetProxyForUrl. We manually checked all other existing Windows syscalls for similar mistakes and did not find any. Updates #879 Co-authored-by: Aaron Klotz Signed-off-by: Josh Bleecher Snyder --- net/tshttpproxy/tshttpproxy_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tshttpproxy/tshttpproxy_windows.go b/net/tshttpproxy/tshttpproxy_windows.go index ac0415d51..5f68ba81e 100644 --- a/net/tshttpproxy/tshttpproxy_windows.go +++ b/net/tshttpproxy/tshttpproxy_windows.go @@ -190,7 +190,7 @@ type autoProxyOptions struct { AutoConfigUrl *uint16 _ uintptr _ uint32 - FAutoLogonIfChallenged bool + FAutoLogonIfChallenged int32 // BOOL } // WINHTTP_PROXY_INFO