mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 17:32:06 +00:00
movdec: Try to recover from overreading atoms
Fixes Ticket1596 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f952ae1400
commit
6093960ae3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user