Merge commit 'a9602c6cfbe6fa06ff97ad01c0ffa9ad5ccff30f' into release/2.2
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Feb 2015 18:28:50 +0000 (19:28 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Feb 2015 18:29:50 +0000 (19:29 +0100)
* commit 'a9602c6cfbe6fa06ff97ad01c0ffa9ad5ccff30f':
  matroskadec: Fix read-after-free in matroska_read_seek()

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

@@@ -2847,10 -2400,11 +2847,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;