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
Родитель 35a07e897c
Коммит 007ffc84ce
1 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -547,7 +547,12 @@ SampleTable::setSampleAuxiliaryInformationSizeParams(
data_offset += mCencInfoCount; 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(); 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(); return parseSampleCencInfo();
} }