aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec.go
diff options
context:
space:
mode:
authorMartin Möhrmann <moehrmann@google.com>2017-02-28 21:21:45 +0100
committerMartin Möhrmann <moehrmann@google.com>2017-02-28 22:50:53 +0000
commit3c023f75a62f903273c688432f95e77fc945b6fb (patch)
tree2ee397d54db68918b6958b3fd79137550cb9324a /src/os/exec/exec.go
parent0fe58bf6500a615e934e1ab2a7921dfbc2803cea (diff)
downloadgo-3c023f75a62f903273c688432f95e77fc945b6fb.tar.xz
strings: fix handling of invalid UTF-8 sequences in Map
The new Map implementation introduced in golang.org/cl/33201 did not differentiate if an invalid UTF-8 sequence was decoded or the RuneError rune. It would therefore always advance by 3 bytes (which is the length of the RuneError rune) instead of 1 for an invalid sequences. This cl adds a check to correctly determine the length of bytes needed to advance to the next rune. Fixes #19330. Change-Id: I1e7f9333f3ef6068ffc64015bb0a9f32b0b7111d Reviewed-on: https://go-review.googlesource.com/37597 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/os/exec/exec.go')
0 files changed, 0 insertions, 0 deletions