[FFmpeg-cvslog] faxcompr: fix out of array read

Michael Niedermayer git at videolan.org
Fri Sep 7 13:34:55 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Sep  7 12:35:41 2012 +0200| [5891e454a667e42ef71a06bfd9661540ea3f3ebd] | committer: Michael Niedermayer

faxcompr: fix out of array read

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/faxcompr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c
index 5aa7885..e7f9d00 100644
--- a/libavcodec/faxcompr.c
+++ b/libavcodec/faxcompr.c
@@ -228,7 +228,7 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
             mode = !mode;
         }
         //sync line pointers
-        while(run_off <= offs){
+        while(offs < width && run_off <= offs){
             run_off += *ref++;
             run_off += *ref++;
         }



More information about the ffmpeg-cvslog mailing list