aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-21 13:32:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-21 13:32:22 +0200
commitc40631baf77f173ef722e715ced2f8d81241eb9a (patch)
treefc56e8f07f9ea2f29503ee0072b2716d81b9d16e
parentc6f2ad9f944d07379072553a310bedc94cd2e74f (diff)
parentcb95c1935f43ee6ae7fd15439df0f674e809f180 (diff)
downloadffmpeg-c40631baf77f173ef722e715ced2f8d81241eb9a.tar.gz
Merge commit 'cb95c1935f43ee6ae7fd15439df0f674e809f180' into release/1.1
* commit 'cb95c1935f43ee6ae7fd15439df0f674e809f180': qt-faststart: Check offset_count before reading from the moov_atom buffer Conflicts: tools/qt-faststart.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--tools/qt-faststart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c
index c9aa6e8287..30086fc0fd 100644
--- a/tools/qt-faststart.c
+++ b/tools/qt-faststart.c
@@ -235,8 +235,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++) {
@@ -256,8 +256,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++) {