aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-10 13:11:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-10 13:11:26 +0100
commit31b697f19c0a6e11fc7832500314a3366e7631be (patch)
tree7ea45b85ca49c290dc3fbfbb7feb63d6976ba0ca
parentc5f52a9440e7786459b322d9db5b2f9ced746571 (diff)
parent6222ee068eeb3d29a2bcc4a89ce31effdef5a061 (diff)
downloadffmpeg-31b697f19c0a6e11fc7832500314a3366e7631be.tar.gz
Merge commit '6222ee068eeb3d29a2bcc4a89ce31effdef5a061' into release/1.1
* commit '6222ee068eeb3d29a2bcc4a89ce31effdef5a061': matroskadec: Fix read-after-free in matroska_read_seek() Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/matroskadec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index aabf4e7af3..459dc1e710 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2393,7 +2393,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;
@@ -2422,6 +2422,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;