Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-12-18 02:07:50 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-02-03 02:11:18 +0300
commit985d3666f672781152f4b68093740ea6a9888194 (patch)
tree066c81bf37f08662dbfb9dae0bbbe1731d4e4145 /libavcodec/pcm.c
parentbe54da2117a6f58c14283f2511e71fda8d3bfe9d (diff)
avcodec/pcm: Fix invalid shift in pcm_decode_frame for LXF
Fixes: left shift of 32 by 28 places cannot be represented in type 'int' Fixes: 19472/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_LXF_fuzzer-5704364320096256 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r--libavcodec/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 4ce0b9487b..0c4b452b0e 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -515,7 +515,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
dst_int32_t = (int32_t *)frame->extended_data[c];
for (i = 0; i < n; i++) {
// extract low 20 bits and expand to 32 bits
- *dst_int32_t++ = (src[2] << 28) |
+ *dst_int32_t++ = ((uint32_t)src[2]<<28) |
(src[1] << 20) |
(src[0] << 12) |
((src[2] & 0x0F) << 8) |