diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index ad9ee071c5..efd017fb52 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -403,7 +403,7 @@ static inline int decode_subframe(FLACContext *s, int channel) return AVERROR_INVALIDDATA; } - if (wasted) { + if (wasted && wasted < 32) { int i; for (i = 0; i < s->blocksize; i++) decoded[i] = (unsigned)decoded[i] << wasted;