should make the code easier to understand
Unified · Split
| @@ -326,7 +326,7 @@ static int decode_remap(FFV1Context *f, FFV1SliceContext *sc) · 325 unmodified lines | ||
| 326 | 326 | } |
| 327 | 327 | if (i == end) |
| 328 | 328 | break; |
| 329 | − if (i - 1 > end || j > 65535) | |
| 329 | + if (i - 1 > end || j >= FF_ARRAY_ELEMS(sc->fltmap[p])) | |
| 330 | 330 | return AVERROR_INVALIDDATA; |
| 331 | 331 | if (end <= 0xFFFF) { |
| 332 | 332 | sc->fltmap [p][j++] = i ^ ((i& 0x8000) ? 0 : flip); |