[FFmpeg-cvslog] matroska: Fix use after free

Dale Curtis git at videolan.org
Thu Jan 17 04:44:33 CET 2013


ffmpeg | branch: release/1.1 | Dale Curtis <dalecurtis at chromium.org> | Thu Jan 10 11:05:29 2013 -0800| [ca2e3f113188e5835533d54000c314721b8445db] | committer: Luca Barbato

matroska: Fix use after free

Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit ae3d41636942cbc0236bad21ad06c65f4eb0f096)

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

 libavformat/matroskadec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index bf67253..86ff477 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1744,6 +1744,7 @@ static int matroska_deliver_packet(MatroskaDemuxContext *matroska,
  */
 static void matroska_clear_queue(MatroskaDemuxContext *matroska)
 {
+    matroska->prev_pkt = NULL;
     if (matroska->packets) {
         int n;
         for (n = 0; n < matroska->num_packets; n++) {
@@ -2231,7 +2232,6 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
         avio_seek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET);
         matroska->current_id = 0;
         while ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
-            matroska->prev_pkt = NULL;
             matroska_clear_queue(matroska);
             if (matroska_parse_cluster(matroska) < 0)
                 break;



More information about the ffmpeg-cvslog mailing list