]> Cypherpunks repositories - gostls13.git/commit
os, syscall: fix incorrect offset calculation in Readlink on windows
authorHiroshi Ioka <hirochachacha@gmail.com>
Sun, 16 Oct 2016 04:25:53 +0000 (13:25 +0900)
committerAlex Brainman <alex.brainman@gmail.com>
Wed, 19 Oct 2016 01:25:18 +0000 (01:25 +0000)
commite65bce7144dbced232df8842ef6825d7e45f094e
tree7f51f524a9607280447df66b708a1325f260ee1e
parentebf827ded7d6997747c96ae8f0f4871c15090d49
os, syscall: fix incorrect offset calculation in Readlink on windows

Current implementation of syscall.Readlink mistakenly calculates
the end offset of the PrintName field.
Also, there are some cases that the PrintName field is empty.
Instead, the CL uses SubstituteName with correct calculation.

Fixes #15978
Fixes #16145

Change-Id: If3257137141129ac1c552d003726d5b9c08bb754
Reviewed-on: https://go-review.googlesource.com/31118
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/zsyscall_windows.go
src/os/os_windows_test.go
src/syscall/syscall_windows.go
src/syscall/ztypes_windows.go