[FFmpeg-cvslog] mov: Do not read past the end of the ctts_data table.
Alex Converse
git at videolan.org
Thu May 3 00:26:19 CEST 2012
ffmpeg | branch: release/0.10 | Alex Converse <alex.converse at gmail.com> | Wed Mar 21 11:24:10 2012 -0700| [86bd0244ec01e873614d94e88177836a9ce650c1] | committer: Reinhard Tartler
mov: Do not read past the end of the ctts_data table.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry picked from commit 86f2ae06b92d42580ae7ebd86d52c9b7acbc2f13)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=86bd0244ec01e873614d94e88177836a9ce650c1
---
libavformat/mov.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 089cdea..c527069 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2668,7 +2668,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->stream_index = sc->ffindex;
pkt->dts = sample->timestamp;
- if (sc->ctts_data) {
+ if (sc->ctts_data && sc->ctts_index < sc->ctts_count) {
pkt->pts = pkt->dts + sc->dts_shift + sc->ctts_data[sc->ctts_index].duration;
/* update ctts context */
sc->ctts_sample++;
More information about the ffmpeg-cvslog
mailing list