[libav-commits] avsdec: Set dimensions instead of relying on the demuxer.

Michael Niedermayer git at libav.org
Sat Sep 29 19:21:26 CEST 2012


Module: libav
Branch: master
Commit: 85f477935cd6b34e6ec2716b20e15ce748277a89

Author:    Michael Niedermayer <michaelni at gmx.at>
Committer: Anton Khirnov <anton at khirnov.net>
Date:      Fri Apr 20 17:42:18 2012 +0200

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>

---

 libavcodec/avs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index d4e2837..b8ee1e1 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;
 }
 



More information about the libav-commits mailing list