[FFmpeg-cvslog] avsdec: Set dimensions instead of relying on the demuxer.
Michael Niedermayer
git at videolan.org
Mon Feb 11 12:41:03 CET 2013
ffmpeg | branch: release/0.5 | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 20 17:42:18 2012 +0200| [6b97e76dfca87ae868fbd2dff689e9de2ee45bcc] | committer: 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
CC:libav-stable at libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton at khirnov.net>
(cherry picked from commit 85f477935cd6b34e6ec2716b20e15ce748277a89)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6b97e76dfca87ae868fbd2dff689e9de2ee45bcc
---
libavcodec/avs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index 3b29c85..e8a55fd 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list