diff options
author | Martin Storsjo <martin@martin.st> | 2019-10-08 15:10:32 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2019-10-08 15:10:32 +0300 |
commit | 3e6e1b2097e8960b0f6ca9b3cec6638d5b6edf49 (patch) | |
tree | 3936983d24262981a3a0ddba2bd67f3648528e9e | |
parent | 18aa41a0e7f242e1dcd1b3c28eba251bc028663d (diff) | |
download | fdk-aac-3e6e1b2097e8960b0f6ca9b3cec6638d5b6edf49.tar.gz fdk-aac-3e6e1b2097e8960b0f6ca9b3cec6638d5b6edf49.tar.bz2 fdk-aac-3e6e1b2097e8960b0f6ca9b3cec6638d5b6edf49.zip |
Revert "Reapply: Avoid reading out of bounds due to too large aaIidIndexMapped"
This reverts commit 28fdc28ec436ceafb11ceb6a354e9916c5265981.
It seems like this isn't needed any longer on the latest upstream
version.
-rw-r--r-- | libSBRdec/src/psdec.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libSBRdec/src/psdec.cpp b/libSBRdec/src/psdec.cpp index b31b310..1f8bd25 100644 --- a/libSBRdec/src/psdec.cpp +++ b/libSBRdec/src/psdec.cpp @@ -325,7 +325,7 @@ void initSlotBasedRotation( int env, int usb) { INT group = 0; INT bin = 0; - INT noIidSteps, noFactors; + INT noIidSteps; FIXP_SGL invL; FIXP_DBL ScaleL, ScaleR; @@ -337,11 +337,9 @@ void initSlotBasedRotation( if (h_ps_d->bsData[h_ps_d->processSlot].mpeg.bFineIidQ) { PScaleFactors = ScaleFactorsFine; /* values are shiftet right by one */ noIidSteps = NO_IID_STEPS_FINE; - noFactors = NO_IID_LEVELS_FINE; } else { PScaleFactors = ScaleFactors; /* values are shiftet right by one */ noIidSteps = NO_IID_STEPS; - noFactors = NO_IID_LEVELS; } /* dequantize and decode */ @@ -360,13 +358,10 @@ void initSlotBasedRotation( /* ScaleR and ScaleL are scaled by 1 shift right */ - ScaleL = ScaleR = 0; - if (noIidSteps + h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env][bin] >= 0 && noIidSteps + h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env][bin] < noFactors) - ScaleR = PScaleFactors[noIidSteps + h_ps_d->specificTo.mpeg.pCoef - ->aaIidIndexMapped[env][bin]]; - if (noIidSteps - h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env][bin] >= 0 && noIidSteps - h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env][bin] < noFactors) - ScaleL = PScaleFactors[noIidSteps - h_ps_d->specificTo.mpeg.pCoef - ->aaIidIndexMapped[env][bin]]; + ScaleR = PScaleFactors[noIidSteps + h_ps_d->specificTo.mpeg.pCoef + ->aaIidIndexMapped[env][bin]]; + ScaleL = PScaleFactors[noIidSteps - h_ps_d->specificTo.mpeg.pCoef + ->aaIidIndexMapped[env][bin]]; AlphasValue = 0; if (h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin] >= 0) |