summaryrefslogtreecommitdiff
path: root/libavcodec/flashsv2enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-12 12:03:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-12 12:07:02 +0200
commit2a37ac042f1247470ebeedeb0cc07059e4ae499f (patch)
treee353ba512bb74860002be1e7edcfc614ff508bbf /libavcodec/flashsv2enc.c
parent40d8c89cb67da27e084060545c9fc2648cdbe17a (diff)
downloadffmpeg-2a37ac042f1247470ebeedeb0cc07059e4ae499f.tar.gz
flashsv2enc: fix division by zero
Fixes other half of Ticket1105 Found-by: ami_stuff Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flashsv2enc.c')
-rw-r--r--libavcodec/flashsv2enc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index fbf0c9c1be..f6883d85b3 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -192,6 +192,11 @@ static av_cold int flashsv2_encode_init(AVCodecContext * avctx)
"Input dimensions too large, input must be max 4096x4096 !\n");
return -1;
}
+ if ((avctx->width < 16) || (avctx->height < 16)) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Input dimensions too small, input must be max 16x16 !\n");
+ return -1;
+ }
if (av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0)
return -1;