Avoids out of array access Another solution may be choosen later if something else turns out to fit naturally into the decoder. But for now dont crash
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavcodec/ffv1dec_template.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c index 37caacb758d..818f12f865d 100644 --- a/libavcodec/ffv1dec_template.c +++ b/libavcodec/ffv1dec_template.c @@ -225,11 +225,11 @@ static int RENAME(decode_rgb_frame)(FFV1Context *f, FFV1SliceContext *sc, r += g; } if (sc->remap) { - r = sc->fltmap[0][r]; - g = sc->fltmap[1][g]; - b = sc->fltmap[2][b]; + r = sc->fltmap[0][r & 0xFFFF]; + g = sc->fltmap[1][g & 0xFFFF]; + b = sc->fltmap[2][b & 0xFFFF]; if (transparency) - a = sc->fltmap[3][a]; + a = sc->fltmap[3][a & 0xFFFF]; } if (lbd) -- 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".