diff --git a/libavformat/mov.c b/libavformat/mov.c index 7fe0548daa..52b73a98e8 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2601,6 +2601,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;