summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/faxcompr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c
index 72ad8b95da..424de599b5 100644
--- a/libavcodec/faxcompr.c
+++ b/libavcodec/faxcompr.c
@@ -217,7 +217,7 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
else
run_off -= *--ref;
offs += run;
- if(offs > width){
+ if(offs > width || run > width){
av_log(avctx, AV_LOG_ERROR, "Run went out of bounds\n");
return -1;
}