aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2019-03-01 12:03:41 -0500
committerRuss Cox <rsc@golang.org>2019-03-05 18:37:55 +0000
commita125bdb49b9aa96f3185ae4dfcc0f6d13b998724 (patch)
treeb2742657a8554224c4b5b59709468b293dbd96c9 /src/encoding/json
parent2f8d2427d9751ab5ebdc64ec68ee8e2c0252d8d4 (diff)
downloadgo-a125bdb49b9aa96f3185ae4dfcc0f6d13b998724.tar.xz
encoding/base64: do not slice past output unnecessarily
Base64-encoding 32 bytes results in a 44-byte string. While in general a 44-byte string might decode to 33 bytes, if you take a 44-byte string that actually only encodes 32 bytes, and you try to decode it into 32 bytes, that should succeed. Instead it fails trying to do a useless dst[33:] slice operation. Delete that slice operation. Noticed while preparing CL 156322. Change-Id: I8024bf28a65e2638675b980732b2ff91c66c62cf Reviewed-on: https://go-review.googlesource.com/c/go/+/164628 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding/json')
0 files changed, 0 insertions, 0 deletions