aboutsummaryrefslogtreecommitdiff
path: root/src/plugin/plugin_dlopen.go
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2017-10-23 13:47:15 -0700
committerJoe Tsai <thebrokentoaster@gmail.com>2017-10-25 22:16:46 +0000
commit78805c07f4119ba0fc7bf2e462451d519f42f679 (patch)
tree38daf0831eed23a5f4f59c3ba4df6b138b1ccd2f /src/plugin/plugin_dlopen.go
parent4aa28896b7703dcb153f0effae4007dd098b6c06 (diff)
downloadgo-78805c07f4119ba0fc7bf2e462451d519f42f679.tar.xz
archive/zip: restrict UTF-8 detection for comment and name fields
CL 39570 added support for automatically setting flag bit 11 to indicate that the filename and comment fields are encoded in UTF-8, which is (conventionally) the encoding using for most Go strings. However, the detection added is too lose for two reasons: * We need to ensure both fields are at least possibly UTF-8. That is, if any field is definitely not UTF-8, then we can't set the bit. * The utf8.ValidRune returns true for utf8.RuneError, which iterating over a Go string automatically returns for invalid UTF-8. Thus, we manually check for that value. Updates #22367 Updates #10741 Change-Id: Ie8aae388432e546e44c6bebd06a00434373ca99e Reviewed-on: https://go-review.googlesource.com/72791 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/plugin/plugin_dlopen.go')
0 files changed, 0 insertions, 0 deletions