1
0
mirror of https://github.com/golang/go synced 2024-10-04 07:21:22 -06:00
go/src/image
Nathan Otterness 66c25fa9be 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>
2015-09-21 23:09:22 +00:00
..
color image/color: fix format typo in the tests. 2015-07-16 01:41:34 +00:00
draw image/draw: optimize out some bounds checks. 2015-09-01 00:34:26 +00:00
gif image/gif: map/slice literals janitoring 2015-09-04 11:58:15 +00:00
internal/imageutil image/color: tweak the YCbCr to RGBA conversion formula. 2015-07-15 05:29:00 +00:00
jpeg image/jpeg: don't unread a byte if we've already taken bits from it. 2015-07-14 06:21:57 +00:00
png image/png: integer underflow when decoding 2015-09-21 23:09:22 +00:00
testdata image/jpeg: support chroma hv values other than 0x11. 2015-03-11 00:10:09 +00:00
decode_example_test.go image/color: tweak the YCbCr to RGBA conversion formula. 2015-07-15 05:29:00 +00:00
decode_test.go image/jpeg: support chroma hv values other than 0x11. 2015-03-11 00:10:09 +00:00
format.go
geom_test.go image: change Rectangle.Eq to return true for all empty rectangles, even 2015-02-18 23:50:09 +00:00
geom.go image: make Rectangle implement Image. 2015-03-04 00:03:46 +00:00
image_test.go
image.go all: link to https instead of http 2015-07-11 14:36:33 +00:00
names.go
ycbcr_test.go image: add YCbCrSubsampleRatio411 and YCbCrSubsampleRatio410. 2015-02-26 00:14:16 +00:00
ycbcr.go image: add YCbCrSubsampleRatio411 and YCbCrSubsampleRatio410. 2015-02-26 00:14:16 +00:00