image: Decode(r io.Reader) return invalid image without error #48612
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I read a image(.png) using image.Decode(). Attempting to manually obtain color information of particular point in the image
runnable program and origin image:
crash_code.txt
What did you expect to see?
I think image.Decode function should return either a valid image.Image or error. If the origin image has internal error, decoder should at least reject it and throw corresponding error, instead of returning an invalid image.
the no empty image returned from Decode can guarantee it's validity. We can easily get whatever pixel color information in this image.
What did you see instead?
The text was updated successfully, but these errors were encountered: