avsdec: Set dimensions instead of relying on the demuxer.
The decode function assumes that the video will have those dimensions.
Fixes CVE-2012-2801
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 85f477935c
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:

committed by
Reinhard Tartler

parent
4475a7d88b
commit
6b97e76dfc
@@ -145,6 +145,7 @@ avs_decode_frame(AVCodecContext * avctx,
|
|||||||
static av_cold int avs_decode_init(AVCodecContext * avctx)
|
static av_cold int avs_decode_init(AVCodecContext * avctx)
|
||||||
{
|
{
|
||||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||||
|
avcodec_set_dimensions(avctx, 318, 198);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user