aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-07 15:40:07 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-20 03:41:33 +0200
commitfc99e4c9725ce6d6a0dcc44e3a1734e67cd62e80 (patch)
treea14f91ca7a54dff8375b319298126219a4d46538 /libavcodec
parentc9cdea2a240949eef48c3752b4b58ce05fc8a280 (diff)
downloadffmpeg-fc99e4c9725ce6d6a0dcc44e3a1734e67cd62e80.tar.gz
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/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c04aa148824f4fb7f4b70830ad3ca7a6cba8ab79) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/g726.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index f3de9e715d..4be44b23d0 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -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 >>= 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)