diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-20 17:42:18 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-09-29 19:18:07 +0200 |
commit | 85f477935cd6b34e6ec2716b20e15ce748277a89 (patch) | |
tree | 2c22933b385dfd406be1a7df8fe0ad7a52dcf7e6 /libavcodec/avs.c | |
parent | d65d8347314b645051e336aed141aaf32a6c0d02 (diff) | |
download | ffmpeg-85f477935cd6b34e6ec2716b20e15ce748277a89.tar.gz |
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>
Diffstat (limited to 'libavcodec/avs.c')
-rw-r--r-- | libavcodec/avs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/avs.c b/libavcodec/avs.c index d4e2837212..b8ee1e1ff2 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -158,6 +158,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; } |