Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b82cc11d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixing memory corruption bug in sound trigger V2_2"

parents ba83d1ea 25ed3e82
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -380,8 +380,8 @@ struct sound_trigger_sound_model* SoundTriggerHw::convertSoundModelToHal(
                            "malloc failed for size %zu in convertSoundModelToHal PHRASE",
                            allocSize);

        const ISoundTriggerHw::PhraseSoundModel* keyPhraseModel =
            reinterpret_cast<const ISoundTriggerHw::PhraseSoundModel*>(soundModel);
        const V2_0::ISoundTriggerHw::PhraseSoundModel* keyPhraseModel =
            reinterpret_cast<const V2_0::ISoundTriggerHw::PhraseSoundModel*>(soundModel);

        size_t i;
        for (i = 0; i < keyPhraseModel->phrases.size() && i < SOUND_TRIGGER_MAX_PHRASES; i++) {