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

Commit 4afdfa7f authored by Dave Sparks's avatar Dave Sparks
Browse files

Don't allow negative numbers in ToneGenerator toneType parameter

Bug 1836596
parent 0b62e242
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -357,7 +357,7 @@ ToneGenerator::~ToneGenerator() {
bool ToneGenerator::startTone(int toneType) {
    bool lResult = false;

    if (toneType >= NUM_TONES)
    if ((toneType < 0) || (toneType >= NUM_TONES))
        return lResult;

    if (mState == TONE_IDLE) {