diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-01 14:32:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-01 14:33:45 +0100 |
commit | 7fa3ec88da8831b5d61fe7cca0f45d2d48e2e387 (patch) | |
tree | 08e636aacad6e622ec12dc129434fd369e7a0895 /tools | |
parent | 77c235206a1b898155c9dd7ebf6ca608e295180b (diff) | |
parent | bb95334c34d0d9abccea370ae25c4765d7764ab8 (diff) | |
download | ffmpeg-7fa3ec88da8831b5d61fe7cca0f45d2d48e2e387.tar.gz |
Merge commit 'bb95334c34d0d9abccea370ae25c4765d7764ab8'
* commit 'bb95334c34d0d9abccea370ae25c4765d7764ab8':
qt-faststart: Check offset_count before reading from the moov_atom buffer
Conflicts:
tools/qt-faststart.c
See: 0ea4742341726ebe42c301bc0d6426cfa01dd134
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qt-faststart.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 7834f48647..5e1288b5f8 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -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++) { |