summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-06-02 21:07:06 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-06-02 21:10:31 (GMT)
commit69ce34c796dd2d595f3312848cf6d0c87506e0d0 (patch)
treebe26a3652bfc792a23f1751c8055ee351267363d
parentc1075d6af72cf3a6d137d52ad8d7d168633efb7a (diff)
downloadffmpeg-69ce34c796dd2d595f3312848cf6d0c87506e0d0.zip
ffmpeg-69ce34c796dd2d595f3312848cf6d0c87506e0d0.tar.gz
ffmpeg-69ce34c796dd2d595f3312848cf6d0c87506e0d0.tar.bz2
tools/qt-faststart: Fix unintended sign extension of atom_size
Fixes CID733810 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--tools/qt-faststart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c
index c9aa6e8..489c1ab 100644
--- a/tools/qt-faststart.c
+++ b/tools/qt-faststart.c
@@ -229,7 +229,7 @@ int main(int argc, char *argv[])
atom_type = BE_32(&moov_atom[i]);
if (atom_type == STCO_ATOM) {
printf(" patching stco atom...\n");
- atom_size = BE_32(&moov_atom[i - 4]);
+ atom_size = (uint32_t)BE_32(&moov_atom[i - 4]);
if (i + atom_size - 4 > moov_atom_size) {
printf(" bad atom size\n");
goto error_out;
@@ -250,7 +250,7 @@ int main(int argc, char *argv[])
i += atom_size - 4;
} else if (atom_type == CO64_ATOM) {
printf(" patching co64 atom...\n");
- atom_size = BE_32(&moov_atom[i - 4]);
+ atom_size = (uint32_t)BE_32(&moov_atom[i - 4]);
if (i + atom_size - 4 > moov_atom_size) {
printf(" bad atom size\n");
goto error_out;