tiff: don't panic when decoding too-large image on 32-bit platforms Includes a new internal/safemath package as a place to put an overflow-checking Mul3 function stolen from std's image package, since that seems like something we can use elsewhere in this repo. This is not a security fix: Inputs whose natural size is too large to fit in memory are not within our threat model. Change-Id: I9b29109ac816e8b8eec18961eadd05696a6a6964 Reviewed-on: https://go-review.googlesource.com/c/image/+/787500 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Neal Patel <nealpatel@google.com> Reviewed-by: Neal Patel <neal@golang.org> Auto-Submit: Damien Neil <dneil@google.com>
This repository holds supplementary Go image packages.
The packages in this repository have the same security model as the standard library image package. Specifically, when operating on arbitrary images, DecodeConfig should be called before Decode, so that the program can decide whether the image, as defined in the returned header, can be safely decoded with the available resources. A call to Decode which produces an extremely large image, as defined in the header returned by DecodeConfig, is not considered a security issue, regardless of whether the image is itself malformed or not.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/image.
The main issue tracker for the image repository is located at https://go.dev/issues. Prefix your issue with “x/image:” in the subject line, so it is easy to find.