summaryrefslogtreecommitdiffstats
path: root/arm-wt-22k/lib_src/eas_wtsynth.c
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2016-01-05 10:16:24 -0800
committerThe Android Automerger <android-build@google.com>2016-02-26 16:55:58 -0800
commite372b39d4bbda91764549bf9cab7672e988f9aa1 (patch)
tree1bb878e4433a4c4b4557372fd4dbd62628a5c0c5 /arm-wt-22k/lib_src/eas_wtsynth.c
parentc9e27eecfec1220b1aaf1b93e031bc08e2456f22 (diff)
downloadandroid_external_sonivox-e372b39d4bbda91764549bf9cab7672e988f9aa1.tar.gz
android_external_sonivox-e372b39d4bbda91764549bf9cab7672e988f9aa1.tar.bz2
android_external_sonivox-e372b39d4bbda91764549bf9cab7672e988f9aa1.zip
Sonivox: sanity check numSamples.
Bug: 26366256 Change-Id: I066888c25035ea4c60c88f316db4508dc4dab6bc
Diffstat (limited to 'arm-wt-22k/lib_src/eas_wtsynth.c')
-rw-r--r--arm-wt-22k/lib_src/eas_wtsynth.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arm-wt-22k/lib_src/eas_wtsynth.c b/arm-wt-22k/lib_src/eas_wtsynth.c
index 45cf4b1..25a70db 100644
--- a/arm-wt-22k/lib_src/eas_wtsynth.c
+++ b/arm-wt-22k/lib_src/eas_wtsynth.c
@@ -28,6 +28,8 @@
*/
// includes
+#include "log/log.h"
+
#include "eas_data.h"
#include "eas_report.h"
#include "eas_host.h"
@@ -467,6 +469,10 @@ EAS_BOOL WT_CheckSampleEnd (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame, E
} else {
pWTIntFrame->numSamples = numSamples;
}
+ if (pWTIntFrame->numSamples < 0) {
+ ALOGE("b/26366256");
+ pWTIntFrame->numSamples = 0;
+ }
/* sound will be done this frame */
done = EAS_TRUE;