]> Cypherpunks repositories - gostls13.git/commit
internal/syscall/windows: increase registry.ExpandString buffer
authorPatrick Mezard <patrick@mezard.eu>
Fri, 8 May 2015 12:57:30 +0000 (14:57 +0200)
committerAlex Brainman <alex.brainman@gmail.com>
Sun, 10 May 2015 02:14:29 +0000 (02:14 +0000)
commit2320b56af1b26e4c945c282a89c53e599596b86c
tree309b2841610828395e32ee8ad2cd7ac461de612b
parent347536201124400705d0d217e2180c9f01066808
internal/syscall/windows: increase registry.ExpandString buffer

ExpandString correctly loops on the syscall until it reaches the
required buffer size but truncates it before converting it back to
string. The truncation limit is increased to 2^15 bytes which is the
documented maximum ExpandEnvironmentStrings output size.

This fixes TestExpandString on systems where len($PATH) > 1024.

Change-Id: I2a6f184eeca939121b458bcffe1a436a50f3298e
Reviewed-on: https://go-review.googlesource.com/9805
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
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/registry/value.go