mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
motionpixels: check extradata size
Fixes null ptr derefernce Fixes Ticket1363 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
849d4b0413
commit
50122084a6
@ -55,6 +55,11 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
|
|||||||
int w4 = (avctx->width + 3) & ~3;
|
int w4 = (avctx->width + 3) & ~3;
|
||||||
int h4 = (avctx->height + 3) & ~3;
|
int h4 = (avctx->height + 3) & ~3;
|
||||||
|
|
||||||
|
if(avctx->extradata_size < 2){
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "extradata too small\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
motionpixels_tableinit();
|
motionpixels_tableinit();
|
||||||
mp->avctx = avctx;
|
mp->avctx = avctx;
|
||||||
ff_dsputil_init(&mp->dsp, avctx);
|
ff_dsputil_init(&mp->dsp, avctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user