[Ffmpeg-cvslog] r7679 - trunk/libavformat/mov.c
bcoudurier
subversion
Wed Jan 24 11:44:25 CET 2007
Author: bcoudurier
Date: Wed Jan 24 11:44:24 2007
New Revision: 7679
Modified:
trunk/libavformat/mov.c
Log:
add sanity checks
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c (original)
+++ trunk/libavformat/mov.c Wed Jan 24 11:44:24 2007
@@ -1619,7 +1619,12 @@
for(i=0; i<mov->total_streams; i++) {
MOVStreamContext *sc = mov->streams[i];
-
+ /* sanity checks */
+ if(!sc->stts_count || !sc->chunk_count || !sc->sample_to_chunk_sz ||
+ (!sc->sample_size && !sc->sample_count)){
+ av_log(s, AV_LOG_ERROR, "missing mandatory atoms, broken header\n");
+ return -1;
+ }
if(!sc->time_rate)
sc->time_rate=1;
if(!sc->time_scale)
More information about the ffmpeg-cvslog
mailing list