motionpixels: check extradata size
Fixes null ptr derefernce Fixes Ticket1363 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 50122084a6b3be06781a2b3d8ec036f2d67c32e3) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
62cbdd71eb
commit
9291fc8813
@ -53,6 +53,11 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
MotionPixelsContext *mp = avctx->priv_data;
|
||||
|
||||
if(avctx->extradata_size < 2){
|
||||
av_log(avctx, AV_LOG_ERROR, "extradata too small\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
motionpixels_tableinit();
|
||||
mp->avctx = avctx;
|
||||
dsputil_init(&mp->dsp, avctx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user