From 9ab63ce1512780752eb5f54bfd91d132a8611b2a Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Wed, 13 Nov 2019 16:06:56 +0100 Subject: Prevent negation of INT_MIN in CConcealment_ApplyRandomSign(). Bug: 146937601 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I9747110eca96b37604df996ef5e86ea58e2d8932 --- libAACdec/src/conceal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libAACdec') diff --git a/libAACdec/src/conceal.cpp b/libAACdec/src/conceal.cpp index 5895cb8..ae98874 100644 --- a/libAACdec/src/conceal.cpp +++ b/libAACdec/src/conceal.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 @@ -1618,7 +1618,7 @@ static void CConcealment_ApplyRandomSign(int randomPhase, FIXP_DBL *spec, } if (packedSign & 0x1) { - spec[i] = -spec[i]; + spec[i] = -fMax(spec[i], (FIXP_DBL)(MINVAL_DBL + 1)); } packedSign >>= 1; -- cgit v1.2.3