[FFmpeg-cvslog] flvdec: Fix invalid pointer deferences when parsing index

Laurent Aimar git at videolan.org
Sat Sep 24 22:46:40 CEST 2011


ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Sep 24 16:16:38 2011 +0200| [2b4e49d4281690db67073ba644ad2ffc17767cdf] | committer: Martin Storsjö

flvdec: Fix invalid pointer deferences when parsing index

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b4e49d4281690db67073ba644ad2ffc17767cdf
---

 libavformat/flvdec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 569d734..474c4d8 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -196,8 +196,8 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream
         }
     }
 
-    if (timeslen == fileposlen)
-         for(i = 0; i < arraylen; i++)
+    if (!ret && timeslen == fileposlen)
+         for (i = 0; i < fileposlen; i++)
              av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME);
     else
         av_log(s, AV_LOG_WARNING, "Invalid keyframes object, skipping.\n");



More information about the ffmpeg-cvslog mailing list