[FFmpeg-cvslog] avcodec/apedec: Fix undefined integer overflow with 24bit
Michael Niedermayer
git at videolan.org
Tue Jul 7 21:41:55 EEST 2020
ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 30 22:01:22 2020 +0200| [11c1e1d6d0eac199ef6c036c946b05a1b463b644] | committer: Michael Niedermayer
avcodec/apedec: Fix undefined integer overflow with 24bit
Fixes: signed integer overflow: 8683744 * 256 cannot be represented in type 'int'
Fixes: 23527/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5679885932822528
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 9f7b252cdf2d0e0f79d16dc7cd575d1884239863)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11c1e1d6d0eac199ef6c036c946b05a1b463b644
---
libavcodec/apedec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 93e9a18e5d..3bec1eee68 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1543,7 +1543,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
for (ch = 0; ch < s->channels; ch++) {
sample24 = (int32_t *)frame->data[ch];
for (i = 0; i < blockstodecode; i++)
- *sample24++ = s->decoded[ch][i] * 256;
+ *sample24++ = s->decoded[ch][i] * 256U;
}
break;
}
More information about the ffmpeg-cvslog
mailing list