1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

msmpeg4dec: check w/h, prevent assert failure later

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-11 18:45:56 +01:00
parent 192db16b9c
commit b7b7e2348c

View File

@ -593,6 +593,11 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
int i;
MVTable *mv;
if(avctx->width<=0 || avctx->height<=0) {
av_log(avctx, AV_LOG_ERROR, "invalid dimensions\n");
return -1;
}
if (ff_h263_decode_init(avctx) < 0)
return -1;