Commit 77a4c8b9 authored by Michael Niedermayer's avatar Michael Niedermayer

yop: check for missing extradata

Fixes null ptr deref
Fixes Ticket1361
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 01900fcc
......@@ -89,6 +89,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment