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>
This commit is contained in:
parent
7f8059bdfe
commit
03f82b5668
@ -89,6 +89,11 @@ static av_cold int yop_decode_init(AVCodecContext *avctx)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!avctx->extradata) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "extradata missing\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||||
|
|
||||||
avcodec_get_frame_defaults(&s->frame);
|
avcodec_get_frame_defaults(&s->frame);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user