aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/g726.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-09-14 13:06:53 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-09-28 14:23:06 +0200
commitac8ac46641adef208485baebc3734463bf0bd266 (patch)
tree999087c8905b3915762f5cd428ba04329b433b6d /libavcodec/g726.c
parentc2087fc48b46ac478944b4e6c59ae2a3a05da0e1 (diff)
downloadffmpeg-ac8ac46641adef208485baebc3734463bf0bd266.tar.gz
avcodec/g726: Add missing ADDB output mask
Fixes: 1.poc Fixes out of array read Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit a5af1240fce845f645440364c1335e0f8e44ee6c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/g726.c')
-rw-r--r--libavcodec/g726.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index c7d138e4b5..ca7f856eac 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -206,7 +206,7 @@ static int16_t g726_decode(G726Context* c, int I)
if (I_sig) /* get the sign */
dq = -dq;
- re_signal = c->se + dq;
+ re_signal = (int16_t)(c->se + dq);
/* Update second order predictor coefficient A2 and A1 */
pk0 = (c->sez + dq) ? sgn(c->sez + dq) : 0;