hajimehoshi / go-mp3

An MP3 decoder in pure Go
Apache License 2.0
746 stars 80 forks source link

Multiple crashers #3

Closed gregory-m closed 7 years ago

gregory-m commented 7 years ago

Decode crushes on flowing inputs:

Found with go-fuzz

"\xff\xfa500000000000\xff\xff0000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"0000"
"\xff\xfb\x100004000094\xff000000" +
"00000000000000000000" +
"00\u007f0\xff\xee\u007f\xff\xee\u007f\xff\xff\u007f\xff\xff\xee\u007f\xff\xff0" +
"\xff\xff00\xff\xee\u007f\xff0000\u007f00\xff00\xee0" +
"000\xff000\xff\xff\xee\u007f0\xff0000\u007f\xff0" +
"00\xff0"
"\xff\xfb\x100004000094\xff000000" +
"00000000000000000000" +
"00\u007f0\xff\xee\u007f\xff\xee\u007f\xff\xff\u007f\xff\xff\xee\u007f\xff\xff\u007f" +
"\xff\xff\u007f0\xff\xee\u007f\xff0000\u007f00\xff\xff\xee\xee0" +
"0\xee\u007f\xff000\xff\xff\xee\u007f0\xff0000\u007f\xff0" +
"0\xff\xff0"
"\xff\xfa\x1000000000000000000" +
"00000000000000000000" +
"000000000000000000\xff\xff" +
"0\u007f\xff\xff\u007f\xff\xff\u007f\xff\xff\xfc0\xff\xef\xbf0\xef\xbf00" +
"0\xff\xee\u007f\xff\xff\u007f\xff\xff\xee\u007f\xff\xff\u007f\xff\xff\u007f\xff00" +
"\xff\xff00"
"\xff\xfa00000031000000000n" +
"s0f00000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000\u007f\xff\xff000\xff\xee"
"\xff\xfa\x1000000000000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000000000000\xbf0\xef\xbf00" +
"0\xff\xee0\xff\xff\u007f\xff\xff\xee\u007f\xff\xff\u007f\xff\xff\u007f\xff00" +
"\xff0\xee0"
"\xff\xfa\x100000050000000000\u007f" +
"00000000000000000000" +
"0000000000\xee\u007f0\xff\xff\xff\xff\u007f\xff\xff" +
"\xee\u007f\xff\xff\u007f\xff\xff\u007f\xff\xff\xfc\xee\xff\xef\xbf0\xef\xbf00" +
"0\xff\xee\u007f\xff\xff\u007f\xff\xff\xee\u007f\xff\xff\u007f\xff\xff\u007f\xff0\t" +
"\xff\xff\xee\xee"
hajimehoshi commented 7 years ago

Thank you for reporting, all fixed.