]> Cypherpunks repositories - gostls13.git/commit
image/tiff: Do not panic when RowsPerStrip is missing.
authorBenny Siegert <bsiegert@gmail.com>
Thu, 28 Jul 2011 01:15:59 +0000 (11:15 +1000)
committerNigel Tao <nigeltao@golang.org>
Thu, 28 Jul 2011 01:15:59 +0000 (11:15 +1000)
commita65f4ccb8994c1e6cfd8031012957a85e943b9b1
treeabebed7c6e4f82bc7db31831a7b7bf6c35a5fa11
parent890bdc53395676efae78218f5d9d6b6eddf26b76
image/tiff: Do not panic when RowsPerStrip is missing.

The RowsPerStrip tag is mandatory according to the spec. However,
Mac OS sometimes (?) omits it. I managed to create such an image
by applying "tiffutil -none" on a compressed image.

If RowsPerStrip is 0, there was a division by zero in the decoder.
Assume that the image is a single strip in this case.

R=nigeltao, bradfitz
CC=golang-dev
https://golang.org/cl/4815061
src/pkg/image/tiff/reader.go
src/pkg/image/tiff/reader_test.go [new file with mode: 0644]
src/pkg/image/tiff/testdata/no_rps.tiff [new file with mode: 0644]