From 4c839c6a90d800d60f66f848f437ccdd800953a9 Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Fri, 20 Sep 2019 14:01:01 +0200 Subject: Fix integer overflow in E_UTIL_preemph(). Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Iaaa0630e59d8e83e58b25168a3db04304485429b --- libAACdec/src/usacdec_acelp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libAACdec/src') diff --git a/libAACdec/src/usacdec_acelp.cpp b/libAACdec/src/usacdec_acelp.cpp index c836c6a..1ac8c9f 100644 --- a/libAACdec/src/usacdec_acelp.cpp +++ b/libAACdec/src/usacdec_acelp.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -131,7 +131,7 @@ void E_UTIL_preemph(const FIXP_DBL *in, FIXP_DBL *out, INT L) { int i; for (i = 0; i < L; i++) { - out[i] = in[i] - fMult(PREEMPH_FAC, in[i - 1]); + out[i] = fAddSaturate(in[i], -fMult(PREEMPH_FAC, in[i - 1])); } return; -- cgit v1.2.3