diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-17 19:28:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-17 19:29:50 +0100 |
commit | e5b878b37f64e443847dd7655d6c2068eb37e130 (patch) | |
tree | c4894923b3d9d4459778ec1a7ef39eb295efbd71 | |
parent | d5b20daeb0e311caa62a899d41c8823c605d117a (diff) | |
parent | a9602c6cfbe6fa06ff97ad01c0ffa9ad5ccff30f (diff) | |
download | ffmpeg-e5b878b37f64e443847dd7655d6c2068eb37e130.tar.gz |
Merge commit 'a9602c6cfbe6fa06ff97ad01c0ffa9ad5ccff30f' into release/2.2
* commit 'a9602c6cfbe6fa06ff97ad01c0ffa9ad5ccff30f':
matroskadec: Fix read-after-free in matroska_read_seek()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/matroskadec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 6ab51c69d5..f0e2acb956 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2822,7 +2822,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { MatroskaDemuxContext *matroska = s->priv_data; - MatroskaTrack *tracks = matroska->tracks.elem; + MatroskaTrack *tracks = NULL; AVStream *st = s->streams[stream_index]; int i, index, index_sub, index_min; @@ -2851,6 +2851,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index, 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; |