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>2020-02-21 00:26:18 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-02-21 23:42:11 +0300
commit051d11f659455f38be7ce40e2dc9d03b082dcd4d (patch)
tree0a18df3611f95c6ba900c607b21040e2ab6f2fd1 /libavcodec/pcm.c
parentd2aff350bc8250d1efe04e90822f49f4b8aea9ae (diff)
avcodec/pcm: Fix invalid shift in AV_CODEC_ID_PCM_LXF
Fixes: left shift of 233 by 24 places cannot be represented in type 'int' Fixes: 20736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_LXF_fuzzer-4829212685107200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> 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 6346510de0..96a68f7fe8 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -513,7 +513,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
((src[2] & 0x0F) << 8) |
src[1];
// extract high 20 bits and expand to 32 bits
- *dst_int32_t++ = (src[4] << 24) |
+ *dst_int32_t++ = ((uint32_t)src[4]<<24) |
(src[3] << 16) |
((src[2] & 0xF0) << 8) |
(src[4] << 4) |