Bug 1092370 - Tighten up MP3FrameParser - r=cpearce

This commit is contained in:
Edwin Flores 2015-01-30 16:54:12 +13:00
parent 3f15e5268d
commit c106c6d3c7

View File

@ -337,6 +337,11 @@ nsresult MP3FrameParser::ParseBuffer(const uint8_t* aBuffer,
// Found an ID3 header. We don't care about the body of the header, so
// just skip past.
buffer = ch + mID3Parser.GetHeaderLength() - (ID3_HEADER_LENGTH - 1);
if (buffer <= ch) {
return NS_ERROR_FAILURE;
}
ch = buffer;
mTotalID3Size += mID3Parser.GetHeaderLength();