Commit c04aa148 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/g726: Fix runtime error: left shift of negative value -2

Fixes: 1393/clusterfuzz-testcase-minimized-5948366791901184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fbc30423
...@@ -269,7 +269,7 @@ static int16_t g726_decode(G726Context* c, int I) ...@@ -269,7 +269,7 @@ static int16_t g726_decode(G726Context* c, int I)
c->se += mult(i2f(c->a[i] >> 2, &f), &c->sr[i]); c->se += mult(i2f(c->a[i] >> 2, &f), &c->sr[i]);
c->se >>= 1; c->se >>= 1;
return av_clip(re_signal << 2, -0xffff, 0xffff); return av_clip(re_signal * 4, -0xffff, 0xffff);
} }
static av_cold int g726_reset(G726Context *c) static av_cold int g726_reset(G726Context *c)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment