[FFmpeg-cvslog] indeo3: fix out of cell write.

Anton Khirnov git at videolan.org
Sun Sep 30 13:59:38 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Sep 29 10:39:49 2012 +0200| [e4d4044339b9c3b0f45f7203cd026eda3c0414c0] | committer: Anton Khirnov

indeo3: fix out of cell write.

Fixes CVE-2012-2776.

CC:libav-stable at libav.org

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4d4044339b9c3b0f45f7203cd026eda3c0414c0
---

 libavcodec/indeo3.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 0f4adc4..18d9e10 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -421,6 +421,9 @@ static int decode_cell_data(Cell *cell, uint8_t *block, uint8_t *ref_block,
     blk_row_offset = (row_offset << (2 + v_zoom)) - (cell->width << 2);
     line_offset    = v_zoom ? row_offset : 0;
 
+    if (cell->height & v_zoom || cell->width & h_zoom)
+        return IV3_BAD_DATA;
+
     for (y = 0; y < cell->height; is_first_row = 0, y += 1 + v_zoom) {
         for (x = 0; x < cell->width; x += 1 + h_zoom) {
             ref = ref_block;



More information about the ffmpeg-cvslog mailing list