History

mov: do not try to read total disc/track number if data atom is too short.

Fixes bug 308.

Carl Eugen Hoyos committed 15 years ago

Commit fbcaceb1 parent 19ad5671 file · +3 −2Browse files

Unified · Split

libavformat/mov.c+3−2
@@ -71,10 +71,11 @@ static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb, · 70 unmodified lines
7171 {
7272 char buf[16];
7373
74− short current, total;
74+ short current, total = 0;
7575 avio_rb16(pb); // unknown
7676 current = avio_rb16(pb);
77− total = avio_rb16(pb);
77+ if (len >= 6)
78+ total = avio_rb16(pb);
7879 if (!total)
7980 snprintf(buf, sizeof(buf), "%d", current);
8081 else

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