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

asm panic: runtime error: index out of range #561

Closed
klauspost opened this issue Apr 21, 2022 · 4 comments · Fixed by #559
Closed

asm panic: runtime error: index out of range #561

klauspost opened this issue Apr 21, 2022 · 4 comments · Fixed by #559
Assignees

Comments

@klauspost
Copy link
Owner

From fuzz tests:

panic: runtime error: index out of range [466] with length 466

goroutine 30 [running]:
github.com/klauspost/compress/zstd.(*sequenceDecs).decode(0xc000089e60, {0xc0003b9000, 0x1d2, 0x21d860})
	e:/gopath/src/github.com/klauspost/compress/zstd/seqdec_amd64.go:225 +0x99d
github.com/klauspost/compress/zstd.(*blockDec).decodeSequences(0xc00010c900, 0xc000089e58)
	e:/gopath/src/github.com/klauspost/compress/zstd/blockdec.go:679 +0x28d
github.com/klauspost/compress/zstd.(*Decoder).startStreamDecoder.func2()
	e:/gopath/src/github.com/klauspost/compress/zstd/decoder.go:721 +0x5f8
created by github.com/klauspost/compress/zstd.(*Decoder).startStreamDecoder
	e:/gopath/src/github.com/klauspost/compress/zstd/decoder.go:686 +0x27d

Sample: 002135096346d2e9c82e7b0b5ef85bacd61ddc17.gz

@klauspost
Copy link
Owner Author

@WojciechMula

@klauspost
Copy link
Owner Author

Maybe: i := len(seqs) - ctx.iteration - 1?

@WojciechMula
Copy link
Contributor

I'm looking at this, please assign me.

@WojciechMula WojciechMula self-assigned this Apr 22, 2022
@klauspost
Copy link
Owner Author

I have added the change to #559 for now.

WojciechMula added a commit to WojciechMula/compress that referenced this issue Apr 22, 2022
WojciechMula added a commit to WojciechMula/compress that referenced this issue Apr 22, 2022
klauspost pushed a commit that referenced this issue Apr 22, 2022
* zstd: factor out zip reader creation to a helper function
* zstd: add regression case for #561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants