avcodec/flacdec: Fix undefined shift in decode_subframe()

Fixes undefined behavior
Fixes: 639961-media

Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/241/head
Michael Niedermayer 8 years ago
parent c72fa43234
commit 1f5630af51
  1. 2
      libavcodec/flacdec.c

@ -452,7 +452,7 @@ static inline int decode_subframe(FLACContext *s, int channel)
if (wasted) {
int i;
for (i = 0; i < s->blocksize; i++)
decoded[i] <<= wasted;
decoded[i] = (unsigned)decoded[i] << wasted;
}
return 0;

Loading…
Cancel
Save