[FFmpeg-cvslog] avcodec/apedec: Fix invalid shift with 24 bps
Michael Niedermayer
git at videolan.org
Fri Apr 24 02:13:50 EEST 2020
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Tue Feb 11 23:56:45 2020 +0100| [bc1e30adc6cc29720a73ee805b5f82b8e90fe009] | committer: Michael Niedermayer
avcodec/apedec: Fix invalid shift with 24 bps
Fixes: left shift of negative value -463
Fixes: 20542/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5688714435231744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 8e278672294f28a3feaba0a38460afd51f0fadda)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc1e30adc6cc29720a73ee805b5f82b8e90fe009
---
libavcodec/apedec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 0958dd2ef7..c00b53e675 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1535,7 +1535,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] << 8;
+ *sample24++ = s->decoded[ch][i] * 256;
}
break;
}
More information about the ffmpeg-cvslog
mailing list