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

Commit 30d77e2c authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix potential buffer overrun

The "samples" parameter indicates the max number of sample tuples, not
the max number of samples.

Bug: 16183063
Change-Id: I5347497bbbe65910b8489d354e985ebc90d65516
parent 64290793
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -357,7 +357,7 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) {
        } else {
            numFrames = vorbis_dsp_pcmout(
                    mState, (int16_t *)outHeader->pBuffer,
                    kMaxNumSamplesPerBuffer);
                    (kMaxNumSamplesPerBuffer / mVi->channels));

            if (numFrames < 0) {
                ALOGE("vorbis_dsp_pcmout returned %d", numFrames);