aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/decode_test.go
diff options
context:
space:
mode:
authorRoland Shoemaker <roland@golang.org>2024-04-09 15:27:30 +0200
committerGopher Robot <gobot@golang.org>2024-04-11 16:15:54 +0000
commit48e00ab70a49652d4b015ac71b80da9f3ae7d1ab (patch)
tree0817dafdef6255ea682b7ae40335dc89de5cdc54 /src/encoding/json/decode_test.go
parentb6778c5230d554c1ba1a69b104513021467d32b2 (diff)
downloadgo-48e00ab70a49652d4b015ac71b80da9f3ae7d1ab.tar.xz
image/gif: revert incorrect usage of clear
CL 570555 replaced a loop which added empty color.RGBA elements with a call to clear. color.Palette is a slice of interfaces, so using clear results in a slice of nil elements, rather than what we previously had which was empty color.RGBA elements. This could cause a panic when attempting to re-encode a GIF which had an extended color palette because of the weird transparency hack. This was discovered by OSS-Fuzz. I've added a test case using their reproducer in order to prevent future regressions. Change-Id: I00a89257d90b6cca68672173eecdaa0a24f18d9c Reviewed-on: https://go-review.googlesource.com/c/go/+/577555 Reviewed-by: Nigel Tao <nigeltao@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Roland Shoemaker <roland@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/encoding/json/decode_test.go')
0 files changed, 0 insertions, 0 deletions