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

Commit c096a130 authored by James Dong's avatar James Dong
Browse files

PV's mp3 decoder mistreated inputBufferCurrentLength in unit of bytes as in unit of bits

bug - 3464899

Change-Id: Idef81a1bd3846d60fc5e4a40c11ce1ba78ebaa23
parent 41440cf8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -122,8 +122,10 @@ ERROR_CODE pvmp3_decode_header(tmp3Bits *inputStream,

    /*
     * Verify that at least the header is complete
     * Note that SYNC_WORD_LNGTH is in unit of bits, but inputBufferCurrentLength
     * is in unit of bytes.
     */
    if (inputStream->inputBufferCurrentLength < (SYNC_WORD_LNGTH + 21))
    if (inputStream->inputBufferCurrentLength < ((SYNC_WORD_LNGTH + 21) >> 3))
    {
        return NO_ENOUGH_MAIN_DATA_ERROR;
    }