matroska: Fix use after free
authorDale Curtis <dalecurtis@chromium.org>
Thu, 10 Jan 2013 19:05:29 +0000 (11:05 -0800)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 8 Jun 2014 23:13:58 +0000 (01:13 +0200)
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit ae3d41636942cbc0236bad21ad06c65f4eb0f096)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/matroskadec.c

index 45bafe5..710883c 100644 (file)
@@ -1720,6 +1720,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++) {