Commit 6b97e76d authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Reinhard Tartler

avsdec: Set dimensions instead of relying on the demuxer.

The decode function assumes that the video will have those dimensions.

Fixes CVE-2012-2801

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarAnton Khirnov <>
(cherry picked from commit 85f47793)
Signed-off-by: 's avatarReinhard Tartler <>
parent 4475a7d8
......@@ -145,6 +145,7 @@ avs_decode_frame(AVCodecContext * avctx,
static av_cold int avs_decode_init(AVCodecContext * avctx)
avctx->pix_fmt = PIX_FMT_PAL8;
avcodec_set_dimensions(avctx, 318, 198);
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment