aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-05-10 21:16:59 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-02 19:55:09 +0200
commit15062f646646487cb756edcb0fd76b0d67bf2b1b (patch)
tree9ca6602c162a9016de91749a21c77381f388d796
parent8858e92b7a1d3f51f488790fc0d370c27da7b22c (diff)
downloadffmpeg-15062f646646487cb756edcb0fd76b0d67bf2b1b.tar.gz
avcodec/utvideodec: Fix integer overflow in decode_plane()
Fixes: signed integer overflow: 2147483594 + 142 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_UTVIDEO_fuzzer-5658568101724160 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 876cfa67f37e944b0f42cb67b2de4e2e06f52e82) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/utvideodec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index 0df91ac2cb..fb29788a02 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -260,7 +260,7 @@ static int decode_plane(UtvideoContext *c, int plane_no,
for (i = 0; i < width * step; i += step) {
pix = fsym;
if (use_pred) {
- prev += pix;
+ prev += (unsigned)pix;
pix = prev;
}
dest[i] = pix;