Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavcodec/ffv1dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 25b55864107..3395f514f42 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -324,9 +324,9 @@ static int decode_remap(FFV1Context *f, FFV1SliceContext *sc) return AVERROR_INVALIDDATA; //not sure we should check this i += current_mul - 1 + delta; } - if (i == end) + if (i - 1 >= end) break; - if (i - 1 > end || j >= FF_ARRAY_ELEMS(sc->fltmap[p])) + if (j >= FF_ARRAY_ELEMS(sc->fltmap[p])) return AVERROR_INVALIDDATA; if (end <= 0xFFFF) { sc->fltmap [p][j++] = i ^ ((i& 0x8000) ? 0 : flip); -- 2.48.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".