History

mov: detect EOF in mov_read_dref()

Avoid a near infinite loop. Issue discovered by cosminamironesei.

Michael Niedermayer committed 14 years ago

Commit 9db67be1 parent 4ed5ac51 file · +2 −0Browse files

Unified · Split

libavformat/mov.c+2−0
@@ -416,6 +416,8 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 415 unmodified lines
416416 avio_skip(pb, 16);
417417
418418 for (type = 0; type != -1 && avio_tell(pb) < next; ) {
419+ if (pb->eof_reached)
420+ return AVERROR_EOF;
419421 type = avio_rb16(pb);
420422 len = avio_rb16(pb);
421423 av_log(c->fc, AV_LOG_DEBUG, "type %d, len %d\n", type, len);

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