git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7cdfce4
)
Do not try to read total disc or track number if data atom is too short.
author
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Thu, 17 Nov 2011 13:12:34 +0000
(14:12 +0100)
committer
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Thu, 17 Nov 2011 13:12:34 +0000
(14:12 +0100)
Fixes ticket #659.
libavformat/mov.c
patch
|
blob
|
history
diff --git
a/libavformat/mov.c
b/libavformat/mov.c
index
668ff89
..
e940427
100644
(file)
--- a/
libavformat/mov.c
+++ b/
libavformat/mov.c
@@
-87,10
+87,11
@@
static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb,
{
char buf[16];
- short current, total;
+ short current, total
= 0
;
avio_rb16(pb); // unknown
current = avio_rb16(pb);
- total = avio_rb16(pb);
+ if (len >= 6)
+ total = avio_rb16(pb);
if (!total)
snprintf(buf, sizeof(buf), "%d", current);
else