x/image/{tiff,bmp}: EOF instead of UnexpectedEOF (original) (raw)

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