mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 09:12:33 +00:00
Do not try to read total disc or track number if data atom is too short.
Fixes ticket #659.
This commit is contained in:
parent
7cdfce4f63
commit
d50122eafa
@ -87,10 +87,11 @@ static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb,
|
|||||||
{
|
{
|
||||||
char buf[16];
|
char buf[16];
|
||||||
|
|
||||||
short current, total;
|
short current, total = 0;
|
||||||
avio_rb16(pb); // unknown
|
avio_rb16(pb); // unknown
|
||||||
current = avio_rb16(pb);
|
current = avio_rb16(pb);
|
||||||
total = avio_rb16(pb);
|
if (len >= 6)
|
||||||
|
total = avio_rb16(pb);
|
||||||
if (!total)
|
if (!total)
|
||||||
snprintf(buf, sizeof(buf), "%d", current);
|
snprintf(buf, sizeof(buf), "%d", current);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user