Fix crash on invalid channel config

Bug: 23876444
Change-Id: I90ad197811ebabceb5b5d74d6d3f20716fbe2d45
This commit is contained in:
Marco Nelissen 2015-09-08 08:48:41 -07:00
parent 6792cf6361
commit b3c5a4bb84
1 changed files with 5 additions and 2 deletions

View File

@ -88,7 +88,7 @@ amm-info@iis.fraunhofer.de
expansion in the PCM time domain.
*******************************************************************************/
#include <log/log.h>
#include "pcmutils_lib.h"
#include "genericStds.h"
@ -2073,7 +2073,10 @@ PCMDMX_ERROR pcmDmx_ApplyFrame (
map[ch++] = inCh;
}
}
FDK_ASSERT(ch == numInChannels);
if (ch != numInChannels) {
ALOGE("b/23876444");
return PCMDMX_INVALID_ARGUMENT;
}
/* Remove unused cols from factor matrix */
for (inCh=0; inCh < numInChannels; inCh+=1) {