From 9357aa67572ce630267144ecd923c643a0982617 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 14 Sep 2016 13:06:53 +0200 Subject: [PATCH] avcodec/g726: Add missing ADDB output mask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 1.poc Fixes out of array read Found-by: 连一汉 Signed-off-by: Michael Niedermayer (cherry picked from commit a5af1240fce845f645440364c1335e0f8e44ee6c) Signed-off-by: Michael Niedermayer --- libavcodec/g726.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/g726.c b/libavcodec/g726.c index c3d018fda6..f3de9e715d 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;