[FFmpeg-cvslog] avcodec/g726: Add missing ADDB output mask

Michael Niedermayer git at videolan.org
Wed Sep 28 15:50:12 EEST 2016


ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Wed Sep 14 13:06:53 2016 +0200| [ac8ac46641adef208485baebc3734463bf0bd266] | committer: Michael Niedermayer

avcodec/g726: Add missing ADDB output mask

Fixes: 1.poc
Fixes out of array read

Found-by: 连一汉 <lianyihan at 360.cn>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit a5af1240fce845f645440364c1335e0f8e44ee6c)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac8ac46641adef208485baebc3734463bf0bd266
---

 libavcodec/g726.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index c7d138e..ca7f856 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;



More information about the ffmpeg-cvslog mailing list