Fixes: signed integer overflow: -1575944192 + -602931200 cannot be represented 
in type 'int'
Fixes: 
62285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QOA_fuzzer-6470469339185152

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
---
 libavcodec/qoadec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/qoadec.c b/libavcodec/qoadec.c
index 75099d1199f..c5cf351f9c1 100644
--- a/libavcodec/qoadec.c
+++ b/libavcodec/qoadec.c
@@ -67,7 +67,7 @@ static int qoa_lms_predict(QOAChannel *lms)
 {
     int prediction = 0;
     for (int i = 0; i < QOA_LMS_LEN; i++)
-        prediction += lms->weights[i] * lms->history[i];
+        prediction += (unsigned)lms->weights[i] * lms->history[i];
     return prediction >> 13;
 }
 
-- 
2.17.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".

Reply via email to