From 5891e454a667e42ef71a06bfd9661540ea3f3ebd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 7 Sep 2012 12:35:41 +0200 Subject: [PATCH] faxcompr: fix out of array read Signed-off-by: Michael Niedermayer --- libavcodec/faxcompr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c index 5aa7885679..e7f9d00a11 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++; }