]> Cypherpunks repositories - gostls13.git/commit
image/gif: check handling of truncated GIF files
authorJeff R. Allen <jra@nella.org>
Sat, 5 Dec 2015 15:06:05 +0000 (21:06 +0600)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 5 Oct 2016 04:28:45 +0000 (04:28 +0000)
commitd1d798dd15e7abbeab335804bd6dfaec6c016018
tree7538a8dc2dfc310738e8ebc754941832a3df12a4
parenta39920fdbbeca653a8b2ac52678378d260e2d396
image/gif: check handling of truncated GIF files

All the prefixes of the testGIF produce errors today,
but they differ wildly in which errors: some are io.EOF,
others are io.ErrUnexpectedEOF, and others are gif-specific.
Make them all gif-specific to explain context, and make
any complaining about EOF be sure to mention the EOF
is unexpected.

Fixes #11390.

Change-Id: I742c39c88591649276268327ea314e68d1de1845
Reviewed-on: https://go-review.googlesource.com/17493
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/image/gif/reader.go
src/image/gif/reader_test.go