Bug 1254721: Ensure consistency between Cenc offsets and sizes table. r=gerald a=lizzard

MozReview-Commit-ID: E1KbKIIBR87
This commit is contained in:
Jean-Yves Avenard 2016-03-15 16:34:33 +11:00
parent 9db5828ce6
commit b75f173ff3

View File

@ -636,8 +636,8 @@ SampleTable::parseSampleCencInfo() {
return OK;
}
if (!mCencSizes.IsEmpty() && mCencOffsets.Length() > 1 &&
mCencSizes.IsEmpty() != mCencOffsets.Length()) {
if ((mCencOffsets.Length() > 1 && mCencOffsets.Length() < mCencInfoCount) ||
(!mCencDefaultSize && mCencSizes.Length() < mCencInfoCount)) {
return ERROR_MALFORMED;
}