]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/g726: Add missing ADDB output mask
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 14 Sep 2016 11:06:53 +0000 (13:06 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 14 Sep 2016 13:50:07 +0000 (15:50 +0200)
Fixes: 1.poc
Fixes out of array read

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/g726.c

index c7d138e4b5080a725ad68bb91ba0de9f5f5f256d..ca7f856eacd113d8422f23e5e3c0a7d7ef5cb04b 100644 (file)
@@ -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;