We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
$ go version go version go1.19 linux/amd64
Yes
go env
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/root/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/root/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/root/.go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/root/.go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.19" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/src/ngolo-fuzzing/go.mod" GOWORK="" 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 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2481516251=/tmp/go-build -gno-record-gcc-switches"
Run https://go.dev/play/p/cJlF9HwR2xU?v=gotip
The program finishing and printing Hello
Just
Program exited.
It is taking more than 10 seconds locally and not finishing...
Found by https://github.com/catenacyber/ngolo-fuzzing with oss-fuzz : https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53720
The text was updated successfully, but these errors were encountered:
In your example you have the following byte stream: 0x52, 0x49, 0x46, 0x46, 0x49, 0x49, 0x49, 0x49, 0x57, 0x45, 0x42, 0x50, 0x56, 0x50, 0x38, 0x4c, 0x58, 0x30, 0x58, 0x2f, 0x2f, 0xa, 0x6f, 0x0, 0x4, 0xc8, 0xc8, 0xc8
0x52, 0x49, 0x46, 0x46, 0x49, 0x49, 0x49, 0x49, 0x57, 0x45, 0x42, 0x50, 0x56, 0x50, 0x38, 0x4c, 0x58, 0x30, 0x58, 0x2f, 0x2f, 0xa, 0x6f, 0x0, 0x4, 0xc8, 0xc8, 0xc8
The riff/webp vp8l decoder finds a width and height of 12043 x 4098, and it actually creates the image in this size. Here an complete example:
package main import ( "bytes" "fmt" "golang.org/x/image/webp" "time" ) func main() { start := time.Now() data := []byte{0x52, 0x49, 0x46, 0x46, 0x49, 0x49, 0x49, 0x49, 0x57, 0x45, 0x42, 0x50, 0x56, 0x50, 0x38, 0x4c, 0x58, 0x30, 0x58, 0x2f, 0x2f, 0xa, 0x6f, 0x0, 0x4, 0xc8, 0xc8, 0xc8} image, err := webp.Decode(bytes.NewReader(data)) if err != nil { panic(err) } fmt.Println(image.Bounds().Dx(), image.Bounds().Dy()) elapsed := time.Since(start) fmt.Printf("Time elapsed: %s", elapsed) }
It will output:
12043 4098 Time elapsed: 2.5472331s
The playground has time execution, cpu and memory restrictions, which you are hitting with the large image you are creating.
Sorry, something went wrong.
Right, Thanks Kevin, I guess I was not patient enough...
No branches or pull requests
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?
Run https://go.dev/play/p/cJlF9HwR2xU?v=gotip
What did you expect to see?
The program finishing and printing Hello
What did you see instead?
Just
It is taking more than 10 seconds locally and not finishing...
Found by https://github.com/catenacyber/ngolo-fuzzing with oss-fuzz :
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53720
The text was updated successfully, but these errors were encountered: