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

Commit 3540a9e5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix potential divide by zero"

parents 768a06e9 b0ed640b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ status_t SampleIterator::findChunkRange(uint32_t sampleIndex) {
        if (mSampleToChunkIndex + 1 < mTable->mNumSampleToChunkOffsets) {
            mStopChunk = entry[1].startChunk;

            if (mStopChunk < mFirstChunk ||
            if (mSamplesPerChunk == 0 || mStopChunk < mFirstChunk ||
                (mStopChunk - mFirstChunk) > UINT32_MAX / mSamplesPerChunk ||
                ((mStopChunk - mFirstChunk) * mSamplesPerChunk >
                 UINT32_MAX - mFirstChunkSampleIndex)) {