aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avs.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-20 17:42:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-20 17:42:18 +0200
commit1df49142bab1b7bccd11392aa9e819e297d21a6e (patch)
treed580e8b13d1d1cb5a7564eec6021c2822c822347 /libavcodec/avs.c
parent34c426be4a3cb52f6d420e5e775a3f2daebcfefe (diff)
downloadffmpeg-1df49142bab1b7bccd11392aa9e819e297d21a6e.tar.gz
avsdec: Set dimensions instead of relying on the demuxer.
This fixes out of array writes. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avs.c')
-rw-r--r--libavcodec/avs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index 17d4e10fa4..801e1bcd78 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -162,6 +162,7 @@ static av_cold int avs_decode_init(AVCodecContext * avctx)
AvsContext *const avs = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_PAL8;
avcodec_get_frame_defaults(&avs->picture);
+ avcodec_set_dimensions(avctx, 318, 198);
return 0;
}