ffmpeg | branch: master | Luca Barbato <[email protected]> | Tue Jul 26 11:42:11 2016 +0200| [2ac00d2d1d51047c6ce69d5fbe1a08392d142658] | committer: Diego Biurrun
mov: Validate the ID number IDs in MOV start from 1. Signed-off-by: Diego Biurrun <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2ac00d2d1d51047c6ce69d5fbe1a08392d142658 --- libavformat/mov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index ff39b58..03427d7 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1949,8 +1949,8 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom) sc->stsc_data[i].first = avio_rb32(pb); sc->stsc_data[i].count = avio_rb32(pb); sc->stsc_data[i].id = avio_rb32(pb); - if (sc->stsc_data[i].id < 0 || sc->stsc_data[i].id > sc->stsd_count) { - sc->stsc_data[i].id = 0; + if (sc->stsc_data[i].id <= 0 || sc->stsc_data[i].id > sc->stsd_count) { + sc->stsc_data[i].id = 1; if (c->fc->error_recognition & AV_EF_EXPLODE) { av_log(c->fc, AV_LOG_ERROR, "Invalid stsc index.\n"); return AVERROR_INVALIDDATA; _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
