aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/encode.go
diff options
context:
space:
mode:
authorAlexander Yastrebov <yastrebov.alex@gmail.com>2023-02-04 14:52:55 +0000
committerNigel Tao <nigeltao@golang.org>2023-02-24 00:03:48 +0000
commitf684f3dc434f9199ceee175c07d28e8b2b0f28dc (patch)
tree0bc3cf7724e7d473815eabd8f4c656cc8ec4ffaf /src/encoding/json/encode.go
parent52fea4b3d97f741162a38e007aa7cdb5aaf52722 (diff)
downloadgo-f684f3dc434f9199ceee175c07d28e8b2b0f28dc.tar.xz
image/jpeg: return io.ErrUnexpectedEOF on truncated data
Decoder calls fill from readFull, ignore and readByte and readByte did not check returned io.EOF. This change moves io.EOF translation inside fill. name old speed new speed delta DecodeBaseline-8 67.4MB/s ± 0% 67.3MB/s ± 0% -0.20% (p=0.000 n=16+19) DecodeProgressive-8 43.7MB/s ± 0% 43.6MB/s ± 0% -0.06% (p=0.013 n=17+19) Fixes #56724 Change-Id: Ia0d5cc561f3c2050e25ec3f2b5e6866c3b4941c7 GitHub-Last-Rev: 470154373bc1452dffc5293d9a840e972749a76d GitHub-Pull-Request: golang/go#56863 Reviewed-on: https://go-review.googlesource.com/c/go/+/452335 Run-TryBot: Rob Pike <r@golang.org> Reviewed-by: Nigel Tao <nigeltao@golang.org> Reviewed-by: Nigel Tao (INACTIVE; USE @golang.org INSTEAD) <nigeltao@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/encoding/json/encode.go')
0 files changed, 0 insertions, 0 deletions