You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
tools/qt-faststart: Fix unintended sign extension of atom_size
Fixes CID733810 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user