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/webp: index out of range #10383

Closed
dvyukov opened this issue Apr 8, 2015 · 4 comments
Closed

x/image/webp: index out of range #10383

dvyukov opened this issue Apr 8, 2015 · 4 comments

Comments

@dvyukov
Copy link
Member

dvyukov commented Apr 8, 2015

Run the following program on the following file:

package main

import (
    "bytes"
    "golang.org/x/image/webp"
    "io/ioutil"
    "os"
)

func main() {
    data, _ := ioutil.ReadFile(os.Args[1])
    webp.Decode(bytes.NewReader(data))
}

https://drive.google.com/file/d/0B20Uwp8Hs1oCQ3RJX3cxMGE4Z2M/view?usp=sharing

Crashes with:

runtime.panicindex()
    runtime/panic.go:12 +0x52 fp=0xc208041980 sp=0xc208041958
golang.org/x/image/vp8l.(*decoder).decodePix(0xc20800a440, 0x640000000a, 0x100000fa0, 0x0, 0x0, 0x0, 0x0, 0x0)
    golang.org/x/image/vp8l/decode.go:440 +0xc51 fp=0xc208041b38 sp=0xc208041980
golang.org/x/image/vp8l.Decode(0x7f48959fb1e8, 0xc20802e080, 0x0, 0x0, 0x0, 0x0)
    golang.org/x/image/vp8l/decode.go:589 +0x1a5 fp=0xc208041cb8 sp=0xc208041b38
golang.org/x/image/webp.decode(0x7f48959fb1c0, 0xc2080143f0, 0x401e00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    golang.org/x/image/webp/decode.go:117 +0xc56 fp=0xc208041ea8 sp=0xc208041cb8
golang.org/x/image/webp.Decode(0x7f48959fb1c0, 0xc2080143f0, 0x0, 0x0, 0x0, 0x0)
    golang.org/x/image/webp/decode.go:256 +0x55 fp=0xc208041f08 sp=0xc208041ea8
main.main()
    webp.go:12 +0x10b fp=0xc208041f90 sp=0xc208041f08

My repository is on commit 65a798f031fd31a65574938bed2ec44c2bcba496.

@dvyukov dvyukov added this to the Go1.5 milestone Apr 8, 2015
@rsc rsc modified the milestones: Unreleased, Go1.5 Apr 26, 2015
@syst3mw0rm
Copy link
Contributor

CL - https://go-review.googlesource.com/#/c/9912/ don't exactly fix this, but it certainly fixes one of the bug associated with this issue. Now getting io.ErrUnexpectedEOF instead.

I'm able to decode the referenced file using libwebp which means that file is in valid webp format.

@gopherbot
Copy link

CL https://golang.org/cl/9912 mentions this issue.

@syst3mw0rm
Copy link
Contributor

@nigeltao thanks for reviewing and merging CL 9912. Should I open a new issue for the problem I mentioned in last comment?

@nigeltao
Copy link
Contributor

Re-opening this issue (if gopherbot automatically closes it at some point) seems fine to me.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
mrhyperbit23z0d added a commit to mrhyperbit23z0d/bhegde8 that referenced this issue Jun 6, 2022
Fixes golang/go#10383

Change-Id: I3e5e357a40a45189c31f0b4db9422dedc351c910
Reviewed-on: https://go-review.googlesource.com/9912
Reviewed-by: Nigel Tao <nigeltao@golang.org>
GalaxyForcew added a commit to GalaxyForcew/A1bisshy that referenced this issue Jun 6, 2022
Fixes golang/go#10383

Change-Id: I3e5e357a40a45189c31f0b4db9422dedc351c910
Reviewed-on: https://go-review.googlesource.com/9912
Reviewed-by: Nigel Tao <nigeltao@golang.org>
yi-ge3 added a commit to yi-ge3/wislie that referenced this issue Jun 6, 2022
Fixes golang/go#10383

Change-Id: I3e5e357a40a45189c31f0b4db9422dedc351c910
Reviewed-on: https://go-review.googlesource.com/9912
Reviewed-by: Nigel Tao <nigeltao@golang.org>
balloontmz6 added a commit to balloontmz6/Likewise42l that referenced this issue Jun 6, 2022
Fixes golang/go#10383

Change-Id: I3e5e357a40a45189c31f0b4db9422dedc351c910
Reviewed-on: https://go-review.googlesource.com/9912
Reviewed-by: Nigel Tao <nigeltao@golang.org>
snapbakkhfbav added a commit to snapbakkhfbav/SayedBaladohr that referenced this issue Oct 6, 2022
Fixes golang/go#10383

Change-Id: I3e5e357a40a45189c31f0b4db9422dedc351c910
Reviewed-on: https://go-review.googlesource.com/9912
Reviewed-by: Nigel Tao <nigeltao@golang.org>
MiderWong5ddop added a commit to MiderWong5ddop/sidie88f that referenced this issue Oct 7, 2022
Fixes golang/go#10383

Change-Id: I3e5e357a40a45189c31f0b4db9422dedc351c910
Reviewed-on: https://go-review.googlesource.com/9912
Reviewed-by: Nigel Tao <nigeltao@golang.org>
rorypeckwnt4v added a commit to rorypeckwnt4v/LearnByBhanuPrataph that referenced this issue Oct 7, 2022
Fixes golang/go#10383

Change-Id: I3e5e357a40a45189c31f0b4db9422dedc351c910
Reviewed-on: https://go-review.googlesource.com/9912
Reviewed-by: Nigel Tao <nigeltao@golang.org>
egorovcharenko9 added a commit to egorovcharenko9/RiceBIOC470z that referenced this issue Oct 7, 2022
Fixes golang/go#10383

Change-Id: I3e5e357a40a45189c31f0b4db9422dedc351c910
Reviewed-on: https://go-review.googlesource.com/9912
Reviewed-by: Nigel Tao <nigeltao@golang.org>
RafayGhafoorf added a commit to RafayGhafoorf/dustinsand8 that referenced this issue Oct 7, 2022
Fixes golang/go#10383

Change-Id: I3e5e357a40a45189c31f0b4db9422dedc351c910
Reviewed-on: https://go-review.googlesource.com/9912
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants