Module: libav
Branch: release/0.7
Commit: 74f4c1358c27d168bd346d3d3db6a097b9f71558

Author:    Laurent Aimar <[email protected]>
Committer: Reinhard Tartler <[email protected]>
Date:      Sat Sep 24 16:16:38 2011 +0200

flvdec: Fix invalid pointer deferences when parsing index

Signed-off-by: Martin Storsjö <[email protected]>
(cherry picked from commit 2b4e49d4281690db67073ba644ad2ffc17767cdf)

Signed-off-by: Anton Khirnov <[email protected]>

---

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

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 5f442f7..a07ac60 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -185,8 +185,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");

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to