aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mss12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-24 01:25:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-24 01:47:20 +0100
commitee9151b616fa7fa5e9b3258ecafd00c9f784baaa (patch)
tree85f464c04c56f8e4fdc83c22d1d522f75e5b4980 /libavcodec/mss12.c
parentdf39c3ce385c02cbd8046298578ea7454c0a0f81 (diff)
downloadffmpeg-ee9151b616fa7fa5e9b3258ecafd00c9f784baaa.tar.gz
ff_mss12_decode_init: check dimensions
Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mss12.c')
-rw-r--r--libavcodec/mss12.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mss12.c b/libavcodec/mss12.c
index 59294b8b14..b522e4a408 100644
--- a/libavcodec/mss12.c
+++ b/libavcodec/mss12.c
@@ -586,6 +586,11 @@ av_cold int ff_mss12_decode_init(MSS12Context *c, int version,
avctx->coded_width, avctx->coded_height);
return AVERROR_INVALIDDATA;
}
+ if (avctx->coded_width < 1 || avctx->coded_height < 1) {
+ av_log(avctx, AV_LOG_ERROR, "Frame dimensions %dx%d too small",
+ avctx->coded_width, avctx->coded_height);
+ return AVERROR_INVALIDDATA;
+ }
av_log(avctx, AV_LOG_DEBUG, "Encoder version %d.%d\n",
AV_RB32(avctx->extradata + 4), AV_RB32(avctx->extradata + 8));