[FFmpeg-cvslog] movdec: Try to recover from overreading atoms
Michael Niedermayer
git at videolan.org
Wed Aug 15 03:31:33 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 15 03:21:19 2012 +0200| [6093960ae35c8d69c559b5604f683c2ea3f279ca] | committer: Michael Niedermayer
movdec: Try to recover from overreading atoms
Fixes Ticket1596
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6093960ae35c8d69c559b5604f683c2ea3f279ca
---
libavformat/mov.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index dce2c91..cb8307f 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;
More information about the ffmpeg-cvslog
mailing list