Closed mattbasta closed 6 years ago
This looks interesting, if you could provide the file that would be great. Thanks for reporting it.
Thanks! I emailed you a link to the file.
I found the issue with this file. The code currently doesn’t support parsing extended headers in the 2.4.0 format. I should ship a fix soon for this.
I've encountered a malformed MP3 file that, when read by jsmediatags in Chrome, causes the current tab to crash. I've been able to reproduce this reliably.
Here's a screenshot of a hex dump of the beginning of the file:![screen shot 2017-10-05 at 10 15 17 pm](https://user-images.githubusercontent.com/279498/31263997-f64ac410-aa1a-11e7-843c-6bb3bf8d45ed.png)
There is maybe five to ten seconds between when the file is passed (as an
ArrayBuffer
, I believe) and when the tab crashes. Pausing the debugger in that time shows it hammering most of the file. In this case, the file is ~25MB.When
readFrames
onID3v2FrameReader
, it's passed an offset of 26 and an offset end of 176. The size of the ID3 tags is 166 bytes. As it reads the frames, it encounters what I assume to be junk, since it loops off into the non-ID3 chunks of the file.I can provide a copy of the file if needed. Let me know if it would be helpful.
Perhaps a good, straightforward solution would be to throw an error if the frame data offset plus the frame data size is greater than the size of the ID3 section?