diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-09-16 23:30:07 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-09-16 23:30:07 +0000 |
commit | 0e9a1509b58db22b2f4c9ae007cb59c65e16bb20 (patch) | |
tree | ed2dba14aa6b7c124a03467ed4b5679b14f2f648 /libSBRdec | |
parent | 63d6409af12c87e7350cf00cd30f60d362bf3311 (diff) | |
parent | ffff95538e9994d312ffdfbba94d88ed226ef7bf (diff) | |
download | fdk-aac-0e9a1509b58db22b2f4c9ae007cb59c65e16bb20.tar.gz fdk-aac-0e9a1509b58db22b2f4c9ae007cb59c65e16bb20.tar.bz2 fdk-aac-0e9a1509b58db22b2f4c9ae007cb59c65e16bb20.zip |
Merge cherrypicks of [12620612, 12620613, 12620936, 12620457, 12616684, 12621005, 12620883, 12620884, 12620846, 12620847, 12620869, 12620848, 12620849, 12620961, 12620962, 12620827, 12620614, 12620197, 12620885, 12620198, 12621039, 12621040, 12621041, 12620937, 12620615, 12620886] into rvc-release
Change-Id: If3dab82f5ef50b669aa488a49aebe27bb6070079
Diffstat (limited to 'libSBRdec')
-rw-r--r-- | libSBRdec/src/sbrdecoder.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libSBRdec/src/sbrdecoder.cpp b/libSBRdec/src/sbrdecoder.cpp index 6e4aad4..55f929f 100644 --- a/libSBRdec/src/sbrdecoder.cpp +++ b/libSBRdec/src/sbrdecoder.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -617,10 +617,6 @@ SBR_ERROR sbrDecoder_InitElement( self->numSbrChannels -= self->pSbrElement[elementIndex]->nChannels; } - /* Save element ID for sanity checks and to have a fallback for concealment. - */ - self->pSbrElement[elementIndex]->elementID = elementID; - /* Determine amount of channels for this element */ switch (elementID) { case ID_NONE: @@ -653,12 +649,16 @@ SBR_ERROR sbrDecoder_InitElement( } /* Sanity check to avoid memory leaks */ - if (elChannels < self->pSbrElement[elementIndex]->nChannels) { + if (elChannels < self->pSbrElement[elementIndex]->nChannels || + (self->numSbrChannels + elChannels) > (8) + (1)) { self->numSbrChannels += self->pSbrElement[elementIndex]->nChannels; sbrError = SBRDEC_PARSE_ERROR; goto bail; } + /* Save element ID for sanity checks and to have a fallback for concealment. + */ + self->pSbrElement[elementIndex]->elementID = elementID; self->pSbrElement[elementIndex]->nChannels = elChannels; for (ch = 0; ch < elChannels; ch++) { |