commit | 66c25fa9beda429a1e32b6dc65e48f071569d841 | [log] [tgz] |
---|---|---|
author | Nathan Otterness <otternes@cs.unc.edu> | Fri Sep 18 20:08:47 2015 -0400 |
committer | Nigel Tao <nigeltao@golang.org> | Mon Sep 21 23:09:22 2015 +0000 |
tree | 08eb6a6e638da5fdeff5dad8b8563588c193fd05 | |
parent | 980cb0caf258b468eca903df85c44224f3e7e5c5 [diff] |
image/png: integer underflow when decoding This change addresses an integer underflow appearing only on systems using a 32-bit int type. The patch addresses the problem by limiting the length of unknown chunks to 0x7fffffff. This value appears to already be checked for when parsing other chunk types, so the bug shouldn't appear elsewhere in the package. The PNG spec recommends the maximum size for any chunk to remain under 2^31, so this shouldn't cause errors with valid images. Fixes #12687 Change-Id: I17f0e1683515532c661cf2b0b2bc65309d1b7bb7 Reviewed-on: https://go-review.googlesource.com/14766 Reviewed-by: Nigel Tao <nigeltao@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Please report issues here: https://golang.org/issue/new
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.