[FFmpeg-cvslog] r23129 - trunk/tools/qt-faststart.c
mstorsjo
subversion
Thu May 13 21:22:56 CEST 2010
Author: mstorsjo
Date: Thu May 13 21:22:56 2010
New Revision: 23129
Log:
qt-faststart: Abort scanning of the input file if a badly sized atom is encountered
If the atom size is 0, qt-faststart currently hangs forever while scanning
the file.
Modified:
trunk/tools/qt-faststart.c
Modified: trunk/tools/qt-faststart.c
==============================================================================
--- trunk/tools/qt-faststart.c Thu May 13 21:18:54 2010 (r23128)
+++ trunk/tools/qt-faststart.c Thu May 13 21:22:56 2010 (r23129)
@@ -163,6 +163,12 @@ int main(int argc, char *argv[])
break;
}
atom_offset += atom_size;
+
+ /* The atom header is 8 (or 16 bytes), if the atom size (which
+ * includes these 8 or 16 bytes) is less than that, we won't be
+ * able to continue scanning sensibly after this atom, so break. */
+ if (atom_size < 8)
+ break;
}
if (atom_type != MOOV_ATOM) {
More information about the ffmpeg-cvslog
mailing list