mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avcodec/flacdec: avoid undefined shift
Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 4688/clusterfuzz-testcase-minimized-6572210748653568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 560daf8891
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
52b7672ef6
commit
5d18394d08
@ -403,7 +403,7 @@ static inline int decode_subframe(FLACContext *s, int channel)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wasted) {
|
if (wasted && wasted < 32) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < s->blocksize; i++)
|
for (i = 0; i < s->blocksize; i++)
|
||||||
decoded[i] = (unsigned)decoded[i] << wasted;
|
decoded[i] = (unsigned)decoded[i] << wasted;
|
||||||
|
Loading…
Reference in New Issue
Block a user