Module: libav Branch: release/0.8 Commit: 86d0bf0e96bf917e283d24239ce0eed08351da86
Author: Martin Storsjö <[email protected]> Committer: Luca Barbato <[email protected]> Date: Mon Jul 15 15:59:50 2013 +0300 mov: Seek back if overreading an individual atom Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Cc: [email protected] Signed-off-by: Martin Storsjö <[email protected]> (cherry picked from commit 5b4eb243bce10a3e8345401a353749e0414c54ca) Signed-off-by: Luca Barbato <[email protected]> Conflicts: libavformat/mov.c --- libavformat/mov.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 0e5d473..9cac506 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -357,6 +357,12 @@ 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_WARNING, + "overread end of atom '%.4s' by %"PRId64" bytes\n", + (char*)&a.type, -left); + avio_seek(pb, left, SEEK_CUR); + } } total_size += a.size; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
