Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-14 21:33:24 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-04-14 21:33:24 +0400
commit0b27136c65c1b4fab29b5b354e1f470f974bc310 (patch)
tree3d8d04b1b63bd7293f6446bf66ba2b29e794a8b6 /libavformat/matroskadec.c
parentc42efad3c34cace09555e05fd0cb81cb59cc726f (diff)
matroskadec: fix null pointer dereference
Fixes: Ticket1206 Found-by: John Villamil Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 2205af6894..e9c31013cd 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1581,9 +1581,11 @@ static int matroska_read_header(AVFormatContext *s)
} else if (codec_id == CODEC_ID_RA_144) {
track->audio.out_samplerate = 8000;
track->audio.channels = 1;
- } else if (codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK ||
- codec_id == CODEC_ID_ATRAC3 || codec_id == CODEC_ID_SIPR) {
+ } else if ((codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK ||
+ codec_id == CODEC_ID_ATRAC3 || codec_id == CODEC_ID_SIPR)
+ && track->codec_priv.data) {
int flavor;
+
ffio_init_context(&b, track->codec_priv.data,track->codec_priv.size,
0, NULL, NULL, NULL, NULL);
avio_skip(&b, 22);