History

movdec: Try to recover from overreading atoms

Fixes Ticket1596

Michael Niedermayer committed 14 years ago

Commit 60939601 parent f952ae11 file · +4 −0Browse files

Unified · Split

libavformat/mov.c+4−0
@@ -2666,6 +2666,10 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 2665 unmodified lines
2666 left = a.size - avio_tell(pb) + start_pos;2666 left = a.size - avio_tell(pb) + start_pos;
2667 if (left > 0) /* skip garbage at atom end */2667 if (left > 0) /* skip garbage at atom end */
2668 avio_skip(pb, left);2668 avio_skip(pb, left);
2669 else if(left < 0) {
2670 av_log(c->fc, AV_LOG_DEBUG, "undoing overread of %d in '%.4s'\n", -left, (char*)&a.type);
2671 avio_seek(pb, left, SEEK_CUR);
2672 }
2669 }2673 }
2670 2674
2671 total_size += a.size;2675 total_size += a.size;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t