Commit 7da15e3e authored by mstorsjo's avatar mstorsjo

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23129 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 705d2053
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment