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: invalid memory address or nil pointer dereference #10384

Closed
dvyukov opened this issue Apr 8, 2015 · 1 comment
Closed

x/image/webp: invalid memory address or nil pointer dereference #10384

dvyukov opened this issue Apr 8, 2015 · 1 comment

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/0B20Uwp8Hs1oCdDNyc2x5eWtvVUU/view?usp=sharing

Crashes with:

runtime.sigpanic()
    src/runtime/sigpanic_unix.go:24 +0x2bf fp=0xc208041a10 sp=0xc2080419c0
golang.org/x/image/riff.(*chunkReader).Read(0x0, 0xc208076000, 0x2000, 0x2000, 0x1, 0x0, 0x0)
    golang.org/x/image/riff/riff.go:151 +0x44 fp=0xc208041aa8 sp=0xc208041a10
io/ioutil.devNull.ReadFrom(0x0, 0x7f0b7195f1e8, 0x0, 0x0, 0x0, 0x0)
    src/io/ioutil/ioutil.go:151 +0xa1 fp=0xc208041b00 sp=0xc208041aa8
io/ioutil.(*devNull).ReadFrom(0xc20800e550, 0x7f0b7195f1e8, 0x0, 0xc208041bb8, 0x0, 0x0)
    <autogenerated>:9 +0xb4 fp=0xc208041b38 sp=0xc208041b00
io.Copy(0x7f0b7195f120, 0xc20800e550, 0x7f0b7195f1e8, 0x0, 0x0, 0x0, 0x0)
    src/io/io.go:358 +0x183 fp=0xc208041c10 sp=0xc208041b38
golang.org/x/image/riff.(*Reader).Next(0xc2080104c0, 0x0, 0x0, 0x0, 0x0, 0x0)
    golang.org/x/image/riff/riff.go:103 +0x123 fp=0xc208041cb8 sp=0xc208041c10
golang.org/x/image/webp.decode(0x7f0b7195f1c0, 0xc2080143f0, 0x401e00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    golang.org/x/image/webp/decode.go:52 +0x1c7 fp=0xc208041ea8 sp=0xc208041cb8
golang.org/x/image/webp.Decode(0x7f0b7195f1c0, 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
@gopherbot
Copy link
Contributor

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

@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
At the time of decoding webp file, if chunkID is not one of
{'ALPH', 'VP8', 'VP8L', 'VP8X'} return errInvalidFormat

Fixes golang/go#10384

Change-Id: I167909b5ddef174d161f806297a08fac6aabcf19
Reviewed-on: https://go-review.googlesource.com/9839
Reviewed-by: Nigel Tao <[email protected]>
GalaxyForcew added a commit to GalaxyForcew/A1bisshy that referenced this issue Jun 6, 2022
At the time of decoding webp file, if chunkID is not one of
{'ALPH', 'VP8', 'VP8L', 'VP8X'} return errInvalidFormat

Fixes golang/go#10384

Change-Id: I167909b5ddef174d161f806297a08fac6aabcf19
Reviewed-on: https://go-review.googlesource.com/9839
Reviewed-by: Nigel Tao <[email protected]>
yi-ge3 added a commit to yi-ge3/wislie that referenced this issue Jun 6, 2022
At the time of decoding webp file, if chunkID is not one of
{'ALPH', 'VP8', 'VP8L', 'VP8X'} return errInvalidFormat

Fixes golang/go#10384

Change-Id: I167909b5ddef174d161f806297a08fac6aabcf19
Reviewed-on: https://go-review.googlesource.com/9839
Reviewed-by: Nigel Tao <[email protected]>
balloontmz6 added a commit to balloontmz6/Likewise42l that referenced this issue Jun 6, 2022
At the time of decoding webp file, if chunkID is not one of
{'ALPH', 'VP8', 'VP8L', 'VP8X'} return errInvalidFormat

Fixes golang/go#10384

Change-Id: I167909b5ddef174d161f806297a08fac6aabcf19
Reviewed-on: https://go-review.googlesource.com/9839
Reviewed-by: Nigel Tao <[email protected]>
snapbakkhfbav added a commit to snapbakkhfbav/SayedBaladohr that referenced this issue Oct 6, 2022
At the time of decoding webp file, if chunkID is not one of
{'ALPH', 'VP8', 'VP8L', 'VP8X'} return errInvalidFormat

Fixes golang/go#10384

Change-Id: I167909b5ddef174d161f806297a08fac6aabcf19
Reviewed-on: https://go-review.googlesource.com/9839
Reviewed-by: Nigel Tao <[email protected]>
MiderWong5ddop added a commit to MiderWong5ddop/sidie88f that referenced this issue Oct 7, 2022
At the time of decoding webp file, if chunkID is not one of
{'ALPH', 'VP8', 'VP8L', 'VP8X'} return errInvalidFormat

Fixes golang/go#10384

Change-Id: I167909b5ddef174d161f806297a08fac6aabcf19
Reviewed-on: https://go-review.googlesource.com/9839
Reviewed-by: Nigel Tao <[email protected]>
rorypeckwnt4v added a commit to rorypeckwnt4v/LearnByBhanuPrataph that referenced this issue Oct 7, 2022
At the time of decoding webp file, if chunkID is not one of
{'ALPH', 'VP8', 'VP8L', 'VP8X'} return errInvalidFormat

Fixes golang/go#10384

Change-Id: I167909b5ddef174d161f806297a08fac6aabcf19
Reviewed-on: https://go-review.googlesource.com/9839
Reviewed-by: Nigel Tao <[email protected]>
egorovcharenko9 added a commit to egorovcharenko9/RiceBIOC470z that referenced this issue Oct 7, 2022
At the time of decoding webp file, if chunkID is not one of
{'ALPH', 'VP8', 'VP8L', 'VP8X'} return errInvalidFormat

Fixes golang/go#10384

Change-Id: I167909b5ddef174d161f806297a08fac6aabcf19
Reviewed-on: https://go-review.googlesource.com/9839
Reviewed-by: Nigel Tao <[email protected]>
RafayGhafoorf added a commit to RafayGhafoorf/dustinsand8 that referenced this issue Oct 7, 2022
At the time of decoding webp file, if chunkID is not one of
{'ALPH', 'VP8', 'VP8L', 'VP8X'} return errInvalidFormat

Fixes golang/go#10384

Change-Id: I167909b5ddef174d161f806297a08fac6aabcf19
Reviewed-on: https://go-review.googlesource.com/9839
Reviewed-by: Nigel Tao <[email protected]>
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

4 participants