Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-11 21:45:56 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-11-11 21:46:22 +0400
commitb7b7e2348c07498f373d3b14a13615de151b2e7e (patch)
tree7261885dde7067d99ddfd9df497495b6e6dac787 /libavcodec/msmpeg4.c
parent192db16b9c202e8d037c4820b11e125d8010e7bc (diff)
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/msmpeg4.c')
-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;