8000 flac.Decode: makeslice: len out of range · Issue #11 · eaburns/flac · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

flac.Decode: makeslice: len out of range #11

8DDF
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

Open
0xbzho opened this issue Oct 21, 2020 · 0 comments
Open

flac.Decode: makeslice: len out of range #11

0xbzho opened this issue Oct 21, 2020 · 0 comments

Comments

@0xbzho
Copy link
0xbzho commented Oct 21, 2020

When given a corrupt FLAC flac.Decode often panics as so:

panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
github.com/eaburns/flac.riceDecode(0xc00009a360, 0xfffffffffffffffa, 0x8, 0x0, 0x0, 0x9, 0x1, 0xc0000a6100)
	/home/ben/pkg/mod/github.com/eaburns/flac@v0.0.0-20171003200620-9a6fb92396d1/decode.go:835 +0x45
github.com/eaburns/flac.decodeResiduals(0xc00009a360, 0x1000, 0x8, 0xc0000a6100, 0x8, 0x8, 0x0, 0x0)
	/home/ben/pkg/mod/github.com/eaburns/flac@v0.0.0-20171003200620-9a6fb92396d1/decode.go:818 +0x1e5
github.com/eaburns/flac.decodeLPCSubFrame(0xc00009a360, 0x18, 0x1000, 0x8, 0x0, 0x4, 0x4, 0x3, 0xc0000a2da8)
	/home/ben/pkg/mod/github.com/eaburns/flac@v0.0.0-20171003200620-9a6fb92396d1/decode.go:747 +0x1c5
github.com/eaburns/flac.readSubFrame(0xc00009a360, 0xc0000c4100, 0x0, 0xc00009a390, 0x0, 0x0, 0x10100000040ceb8, 0x0)
	/home/ben/pkg/mod/github.com/eaburns/flac@v0.0.0-20171003200620-9a6fb92396d1/decode.go:346 +0x38f
github.com/eaburns/flac.(*Decoder).Next(0xc00009a180, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/ben/pkg/mod/github.com/eaburns/flac@v0.0.0-20171003200620-9a6fb92396d1/decode.go:289 +0x245
github.com/eaburns/flac.Decode(0x4d1820, 0xc0000ae018, 0x0, 0xc000000000, 0xc0000ae018, 0x0, 0x0, 0x499d80, 0xc000094058)
	/home/ben/pkg/mod/github.com/eaburns/flac@v0.0.0-20171003200620-9a6fb92396d1/decode.go:29 +0x145

Attached are two invalid FLACs which cause this panic, and one valid (surf.44101hz.flac.zip).

qlevel--16-not-supported.flac.zip
crc-mismatch.flac.zip
surf.44101hz.flac.zip

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

No branches or pull requests

1 participant
0