summaryrefslogtreecommitdiffstats
path: root/services/soundtrigger
diff options
context:
space:
mode:
authorSam Mortimer <sam@mortimer.me.uk>2016-12-09 13:36:25 -0800
committerEthan Chen <intervigil@gmail.com>2016-12-13 17:57:00 -0800
commit82016b05946bd41ecbaf6872c00b0195ea80c094 (patch)
treef47f468879dd543a39bba071757834e53f4d1d5d /services/soundtrigger
parentfd66f406edcb6c20558073ee4f5a0aa5f994716e (diff)
downloadframeworks_av-82016b05946bd41ecbaf6872c00b0195ea80c094.zip
frameworks_av-82016b05946bd41ecbaf6872c00b0195ea80c094.tar.gz
frameworks_av-82016b05946bd41ecbaf6872c00b0195ea80c094.tar.bz2
soundtrigger: fix memory corruption
Fixes hotword on angler. Change-Id: Ic15a617c0f79f03785feaddd2dfa6deb90842a06 (cherry picked from commit 5f72b2213b9dc96ce91871398b539ad6aa653142)
Diffstat (limited to 'services/soundtrigger')
-rw-r--r--services/soundtrigger/SoundTriggerHwService.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/soundtrigger/SoundTriggerHwService.cpp b/services/soundtrigger/SoundTriggerHwService.cpp
index a1cc6ff..a45d5f6 100644
--- a/services/soundtrigger/SoundTriggerHwService.cpp
+++ b/services/soundtrigger/SoundTriggerHwService.cpp
@@ -270,12 +270,12 @@ void SoundTriggerHwService::sendRecognitionEvent(struct sound_trigger_recognitio
if (module == NULL) {
return;
}
+ struct sound_trigger_phrase_recognition_event newEvent;
if (event-> type == SOUND_MODEL_TYPE_KEYPHRASE && event->data_size != 0
&& event->data_offset != sizeof(struct sound_trigger_phrase_recognition_event)) {
// set some defaults for the phrase if the recognition event won't be parsed properly
// TODO: read defaults from the config
- struct sound_trigger_phrase_recognition_event newEvent;
memset(&newEvent, 0, sizeof(struct sound_trigger_phrase_recognition_event));
sp<Model> model = module->getModel(event->model);