]> Cypherpunks repositories - gostls13.git/commit
image/gif: avoid decoding past the first frame in decode()
authorChris Gillis <gillisct@gmail.com>
Fri, 18 Jun 2021 02:14:28 +0000 (02:14 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 22 Aug 2022 15:51:31 +0000 (15:51 +0000)
commitb4c124af1e2953e010200fe50651f5ffc967a346
treed8ae11ba47afeeed98cf435f9b5205c3b2c0a45a
parentdb3e915af2f5053c96ad1f33502a752768965676
image/gif: avoid decoding past the first frame in decode()

The existing decode() method offers the ability to keep just one
frame of the GIF image, however it will read and decompress all
subsequent frames regardless.

Fixes #41142

Change-Id: I0c3c11f9c11cd487b6c365e9a8b98e617d555db0
GitHub-Last-Rev: 03ebc8ee7bb19ee80c62d0c935b783d7bc75c2e9
GitHub-Pull-Request: golang/go#46813
Reviewed-on: https://go-review.googlesource.com/c/go/+/329329
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Paul Tyng <paul@paultyng.net>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Nigel Tao (INACTIVE; USE @golang.org INSTEAD) <nigeltao@google.com>
src/image/gif/reader.go
src/image/gif/reader_test.go