diff options
author | Wei Jia <wjia@google.com> | 2016-01-05 10:16:24 -0800 |
---|---|---|
committer | Wei Jia <wjia@google.com> | 2016-01-06 11:08:33 -0800 |
commit | 3ac044334c3ff6a61cb4238ff3ddaf17c7efcf49 (patch) | |
tree | 2bce50fb0769bb712eb50c16917975ad6932cb56 /arm-wt-22k/lib_src/eas_wtsynth.c | |
parent | a12313fe89f99a51e8d166209833ac89045ebf70 (diff) | |
download | android_external_sonivox-3ac044334c3ff6a61cb4238ff3ddaf17c7efcf49.tar.gz android_external_sonivox-3ac044334c3ff6a61cb4238ff3ddaf17c7efcf49.tar.bz2 android_external_sonivox-3ac044334c3ff6a61cb4238ff3ddaf17c7efcf49.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.c | 6 |
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; |