Merge commit '532c96a2158c04f265d750d54f2f103b8d9fe0ef' into release/2.4
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 13 Feb 2015 19:32:46 +0000 (20:32 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 13 Feb 2015 19:32:53 +0000 (20:32 +0100)
* commit '532c96a2158c04f265d750d54f2f103b8d9fe0ef':
  matroskadec: Fix read-after-free in matroska_read_seek()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/matroskadec.c

@@@ -2937,10 -2558,11 +2937,11 @@@ static int matroska_read_seek(AVFormatC
      }
  
      matroska_clear_queue(matroska);
 -    if (index < 0)
 -        return 0;
 +    if (index < 0 || (matroska->cues_parsing_deferred < 0 && index == st->nb_index_entries - 1))
 +        goto err;
  
      index_min = index;
+     tracks = matroska->tracks.elem;
      for (i = 0; i < matroska->tracks.nb_elem; i++) {
          tracks[i].audio.pkt_cnt        = 0;
          tracks[i].audio.sub_packet_cnt = 0;