From: Michael Niedermayer <[email protected]>

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: Anton Khirnov <[email protected]>
---
 libavcodec/avs.c |    1 +
 1 file changed, 1 insertion(+)

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;
 }
 
-- 
1.7.10.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to