aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-28 17:08:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-09 21:06:29 +0200
commit0f5840b51abe873da8e7805bc0aeb6ea9725b78a (patch)
tree8781e6c5ab84669a77fe1501bf93b482bd248590
parent1285fe5530437132a9d68d336d08b21c0e4ad58c (diff)
downloadffmpeg-0f5840b51abe873da8e7805bc0aeb6ea9725b78a.tar.gz
yop: check for missing extradata
Fixes null ptr deref Fixes Ticket1361 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 77a4c8b959fa9bc6bcaa42b40a0b046cdf3fec38) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/yop.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/yop.c b/libavcodec/yop.c
index 45a3344b9e..40d9f7a818 100644
--- a/libavcodec/yop.c
+++ b/libavcodec/yop.c
@@ -90,6 +90,11 @@ static av_cold int yop_decode_init(AVCodecContext *avctx)
return -1;
}
+ if (!avctx->extradata) {
+ av_log(avctx, AV_LOG_ERROR, "extradata missing\n");
+ return AVERROR_INVALIDDATA;
+ }
+
avctx->pix_fmt = PIX_FMT_PAL8;
avcodec_get_frame_defaults(&s->frame);