diff options
author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2020-10-20 21:13:15 -0700 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-10-21 18:26:10 +0200 |
commit | 58a8f05f50b633bb45c7cc299c405618489c18ad (patch) | |
tree | 65dea9558c57378026da316bfd6de4bf1b95e24a /tun | |
parent | 0b54907a73ce0810c3a148007c45e66eae7109d6 (diff) |
tun/wintun/registry: fix Go 1.15 race/checkptr failure
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
[Jason: ran go mod tidy.]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tun')
-rw-r--r-- | tun/wintun/registry/registry_windows.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/wintun/registry/registry_windows.go b/tun/wintun/registry/registry_windows.go index 6be88fd..70419a5 100644 --- a/tun/wintun/registry/registry_windows.go +++ b/tun/wintun/registry/registry_windows.go @@ -183,7 +183,7 @@ func toString(buf []byte, valueType uint32, err error) (string, error) { if len(buf) == 0 { return "", nil } - value = windows.UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(&buf[0]))[:len(buf)/2]) + value = windows.UTF16PtrToString((*uint16)(unsafe.Pointer(&buf[0]))) default: return "", registry.ErrUnexpectedType |