x/image/{tiff,bmp}: EOF instead of UnexpectedEOF
dvyukov opened this issue · 1 comments
dvyukov commented
The following program prints EOF, which looks weird (whole image decoded?). Jpeg and png print UnexpectedEOF in this case. Tiff should also return UnexpectedEOF. The same for bmp package.
package main
import (
"bytes"
"fmt"
"golang.org/x/image/tiff"
)
func main() {
_, err := tiff.Decode(bytes.NewReader([]byte{}))
fmt.Printf("err: %v\n", err)
}
on commit eb11b45157c1b71f30b3cec66306f1cd779a689e
go version devel +3cab476 Sun Jun 21 03:11:01 2015 +0000 linux/amd64
gopherbot commented
Change https://golang.org/cl/205458 mentions this issue: tiff, bmp: return io.UnexpectedEOF on empty data