Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/image: riff: missing RIFF chunk header #27873

Closed
acim opened this issue Sep 26, 2018 · 5 comments
Closed

x/image: riff: missing RIFF chunk header #27873

acim opened this issue Sep 26, 2018 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@acim
Copy link

acim commented Sep 26, 2018

What version of Go are you using (go version)?

1.11

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/acim/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/acim/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/acim/Projects/shit/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build158015811=/tmp/go-build -gno-record-gcc-switches"

What did you do?

	file, err := os.Open("1.webp")
	if err != nil {
		panic(err)
	}
	defer file.Close()

	image, err := webp.Decode(file)
	if err != nil {
		panic(err)
	}
       ...

What did you expect to see?

Image gets decoded.

What did you see instead?

Panic from webp.Decod:

riff: missing RIFF chunk header

I tried several webp images at this happens with all of them. However, webp.DecodeConfig works well with the same files.

@gopherbot gopherbot added this to the Unreleased milestone Sep 26, 2018
@bcmills
Copy link
Contributor

bcmills commented Sep 26, 2018

CC @nigeltao

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 26, 2018
@bcmills
Copy link
Contributor

bcmills commented Sep 26, 2018

Can you attach (or give a link to) an image file that triggers the issue?

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 26, 2018
@acim
Copy link
Author

acim commented Sep 26, 2018

https://files.fm/u/9gqueavn

It is previously downloaded from here:

https://developers.google.com/speed/webp/gallery1

@iand
Copy link
Contributor

iand commented Sep 26, 2018

I can't reproduce this. However if I replace 1.webp with a zero length file then I see the riff: missing RIFF chunk header error. Can you check the filesize of 1.webp on your system. The one you linked to is 30320 bytes.

@acim
Copy link
Author

acim commented Sep 26, 2018

My bad, had to open file again because io.Reader has been emptied by DecodeConfig. Thank you, you can close this.

@golang golang locked and limited conversation to collaborators Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants