Merge commit 'bb95334c34d0d9abccea370ae25c4765d7764ab8'

* commit 'bb95334c34d0d9abccea370ae25c4765d7764ab8':
  qt-faststart: Check offset_count before reading from the moov_atom buffer

Conflicts:
	tools/qt-faststart.c

See: 0ea4742341
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-03-01 14:32:22 +01:00
commit 7fa3ec88da
1 changed files with 4 additions and 4 deletions

View File

@ -240,8 +240,8 @@ int main(int argc, char *argv[])
goto error_out;
}
offset_count = BE_32(&moov_atom[i + 8]);
if (i + 12LL + offset_count * 4LL > moov_atom_size) {
printf(" bad atom size\n");
if (i + 12 + offset_count * UINT64_C(4) > moov_atom_size) {
printf(" bad atom size/element count\n");
goto error_out;
}
for (j = 0; j < offset_count; j++) {
@ -261,8 +261,8 @@ int main(int argc, char *argv[])
goto error_out;
}
offset_count = BE_32(&moov_atom[i + 8]);
if (i + 12LL + offset_count * 8LL > moov_atom_size) {
printf(" bad atom size\n");
if (i + 12 + offset_count * UINT64_C(8) > moov_atom_size) {
printf(" bad atom size/element count\n");
goto error_out;
}
for (j = 0; j < offset_count; j++) {