shithub: opus

Download patch

ref: adcb7bc21d0afa79c1975030b29dfeef76651839
parent: 923bebde197f42ba8e55cb055dce3ff22bbea54d
author: Felicia Lim <flim@google.com>
date: Mon Mar 23 12:46:03 EDT 2020

Fix another signed integer overflow in silk_noise_shape_quantizer_del_dec

--- a/silk/NSQ_del_dec.c
+++ b/silk/NSQ_del_dec.c
@@ -451,7 +451,7 @@
 
             /* Input minus prediction plus noise feedback                       */
             /* r = x[ i ] - LTP_pred - LPC_pred + n_AR + n_Tilt + n_LF + n_LTP  */
-            tmp1 = silk_ADD32( n_AR_Q14, n_LF_Q14 );                                    /* Q14 */
+            tmp1 = silk_ADD_SAT32( n_AR_Q14, n_LF_Q14 );                                /* Q14 */
             tmp2 = silk_ADD32( n_LTP_Q14, LPC_pred_Q14 );                               /* Q13 */
             tmp1 = silk_SUB_SAT32( tmp2, tmp1 );                                        /* Q13 */
             tmp1 = silk_RSHIFT_ROUND( tmp1, 4 );                                        /* Q10 */