should make the code easier to understand

Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/ffv1dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 21a7642a08b..25b55864107 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -326,7 +326,7 @@ static int decode_remap(FFV1Context *f, FFV1SliceContext 
*sc)
                 }
                 if (i == end)
                     break;
-                if (i - 1 > end || j > 65535)
+                if (i - 1 > end || 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
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to