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

Commit 2cb9d98d authored by Harish Mahendrakar's avatar Harish Mahendrakar Committed by Ray Essick
Browse files

mp3dec: Zero initialize decoder memory during initialization

Bug: 144901522
Test: poc in bug
Test: atest android.mediav2.cts
Test: atest atest android.media.cts.DecoderTest

Change-Id: I28e49f7b07392cd74a8cfeb90e106e6b762504c5
parent ccc44f3f
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -659,20 +659,12 @@ void pvmp3_InitDecoder(tPVMP3DecoderExternal *pExt,
    huffcodetab       *pHuff;

    pVars = (tmp3dec_file *)pMem;

    pVars->num_channels = 0;
    memset(pVars, 0, sizeof(*pVars));

    pExt->totalNumberOfBitsUsed = 0;
    pExt->inputBufferCurrentLength = 0;
    pExt->inputBufferUsedLength    = 0;

    pVars->mainDataStream.offset = 0;

    pv_memset((void*)pVars->mainDataBuffer,
              0,
              BUFSIZE*sizeof(*pVars->mainDataBuffer));


    pVars->inputStream.pBuffer = pExt->pInputBuffer;

    /*