diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-15 03:21:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-15 03:21:19 +0200 |
commit | 6093960ae35c8d69c559b5604f683c2ea3f279ca (patch) | |
tree | d6eff9fdc33389363723580271d1e45de80ce17d | |
parent | f952ae1400c5bb76642044229e4663925a4b7ff7 (diff) | |
download | ffmpeg-6093960ae35c8d69c559b5604f683c2ea3f279ca.tar.gz |
movdec: Try to recover from overreading atoms
Fixes Ticket1596
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index dce2c91524..cb8307fe8f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2666,6 +2666,10 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) left = a.size - avio_tell(pb) + start_pos; if (left > 0) /* skip garbage at atom end */ avio_skip(pb, left); + else if(left < 0) { + av_log(c->fc, AV_LOG_DEBUG, "undoing overread of %d in '%.4s'\n", -left, (char*)&a.type); + avio_seek(pb, left, SEEK_CUR); + } } total_size += a.size; |