aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-11 18:45:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-11 18:46:22 +0100
commitb7b7e2348c07498f373d3b14a13615de151b2e7e (patch)
tree7261885dde7067d99ddfd9df497495b6e6dac787 /libavcodec
parent192db16b9c202e8d037c4820b11e125d8010e7bc (diff)
downloadffmpeg-b7b7e2348c07498f373d3b14a13615de151b2e7e.tar.gz
msmpeg4dec: check w/h, prevent assert failure later
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/msmpeg4.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 7988e1f36b..39305f74a6 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -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;