From 1df4b16f92a4d22e7a2ccf0efbd35d8edfffaa75 Mon Sep 17 00:00:00 2001 From: Sushanth Patil Date: Tue, 26 Mar 2019 17:50:19 +0530 Subject: [PATCH] Fix for sub-oveflow in ixheaacd_tns_ar_filter_fixed_armv8 Added check for subtraction overflow. Bug:129251257 Test: vendor Change-Id: I318705f48d0fd0ef2ca14c258cbf6b9113852da1 --- decoder/ixheaacd_aac_tns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decoder/ixheaacd_aac_tns.c b/decoder/ixheaacd_aac_tns.c index 3fbaf9a..b4b3f4d 100644 --- a/decoder/ixheaacd_aac_tns.c +++ b/decoder/ixheaacd_aac_tns.c @@ -349,7 +349,7 @@ VOID ixheaacd_tns_ar_filter_fixed_armv8(WORD32 *spectrum, WORD32 size, } acc1 = (WORD32)(acc >> 32); - y = ixheaacd_sub32(y, ixheaacd_shl32_sat(acc1, 1)); + y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc1, 1)); state[0] = ixheaacd_shl32_sat(y, shift_value); *spectrum = y >> scale_spec;