Bug 1181223 - p2: Handle wrong saio/saiz size instead of assuming it is correct - r=rillian

This commit is contained in:
Gerald Squelart 2015-11-05 19:06:00 +01:00
parent 35a07e897c
commit 007ffc84ce

View File

@ -547,7 +547,12 @@ SampleTable::setSampleAuxiliaryInformationSizeParams(
data_offset += mCencInfoCount;
}
CHECK(data_offset == data_end);
if (data_offset != data_end) {
ALOGW("wrong saiz data size, expected %lu, actual %lu",
data_size, data_offset - (data_end - data_size));
// Continue, assume extra data is not important.
// Parser will skip past the box end.
}
return parseSampleCencInfo();
}
@ -612,7 +617,12 @@ SampleTable::setSampleAuxiliaryInformationOffsetParams(
}
}
CHECK(data_offset == data_end);
if (data_offset != data_end) {
ALOGW("wrong saio data size, expected %lu, actual %lu",
data_size, data_offset - (data_end - data_size));
// Continue, assume extra data is not important.
// Parser will skip past the box end.
}
return parseSampleCencInfo();
}