Closed patrickjennings closed 9 years ago
@patrickjennings I'll check it tonight. Would you like to use test example to show details, or make a pull request
to contribute?
Perfect. I will send two files via email to you which I have found cause this issue.
Fixed the bug. I test your two files again, 11. The Herbaliser - Repetitive Loop (Reloop).mp3
will be parsed successfully. But 01 Shapes of Things 1.mp3
, its tag version is id3v2.2, which is not supported yet.
{
version: {
v2: {
major: 2,
minor: 2,
revision: 0
}
},
flags: {
unsync: 0,
xheader: 0,
experimental: 0
}
}
Inside of parseV2Frames, I noticed that calcFrameSize would sometimes return NaN or a really large number and cause issues inside of the loop. I fixed the issue by changing to the following:
if(isNaN(size) || size === 0 || size > buffer.length - position - 10) { break; }
Let me know what you think.