1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-01-30 15:35:16 +01:00

Fix integer overflow in complex multiplication called from CLpd_FAC_Acelp2Mdct().

Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I7cd234698821cf13b163d323cfd90fdccaaec3c1
This commit is contained in:
Fraunhofer IIS FDK 2019-10-18 14:03:59 +02:00 committed by Jean-Michel Trivi
parent f22eb9c1fa
commit 3634955ca5

View File

@ -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
@ -668,9 +668,9 @@ INT CLpd_FAC_Acelp2Mdct(H_MDCT hMdct, FIXP_DBL *output, FIXP_DBL *_pSpec,
for (i = 0; i < fl / 2; i++) {
FIXP_DBL x0, x1;
cplxMult(&x1, &x0, *pCurr++, -*pOvl--, pWindow_prev[i]);
*pOut0 = IMDCT_SCALE_DBL(x0);
*pOut1 = IMDCT_SCALE_DBL(-x1);
cplxMultDiv2(&x1, &x0, *pCurr++, -*pOvl--, pWindow_prev[i]);
*pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
*pOut1 = IMDCT_SCALE_DBL_LSH1(-x1);
pOut0++;
pOut1--;
}
@ -680,9 +680,9 @@ INT CLpd_FAC_Acelp2Mdct(H_MDCT hMdct, FIXP_DBL *output, FIXP_DBL *_pSpec,
for (i = 0; i < fl / 2; i++) {
FIXP_DBL x0, x1;
cplxMult(&x1, &x0, *pCurr++, -*pOvl--, pWindow_prev[i]);
*pOut0 = IMDCT_SCALE_DBL(x0);
*pOut1 = IMDCT_SCALE_DBL(x1);
cplxMultDiv2(&x1, &x0, *pCurr++, -*pOvl--, pWindow_prev[i]);
*pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
*pOut1 = IMDCT_SCALE_DBL_LSH1(x1);
pOut0++;
pOut1--;
}
@ -691,9 +691,9 @@ INT CLpd_FAC_Acelp2Mdct(H_MDCT hMdct, FIXP_DBL *output, FIXP_DBL *_pSpec,
for (i = 0; i < fl / 2; i++) {
FIXP_DBL x0, x1;
cplxMult(&x1, &x0, *pCurr++, *pOvl--, pWindow_prev[i]);
*pOut0 = IMDCT_SCALE_DBL(x0);
*pOut1 = IMDCT_SCALE_DBL(x1);
cplxMultDiv2(&x1, &x0, *pCurr++, *pOvl--, pWindow_prev[i]);
*pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
*pOut1 = IMDCT_SCALE_DBL_LSH1(x1);
pOut0++;
pOut1--;
}