VirtualBox

Changeset 88889 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
May 6, 2021 12:47:10 AM (4 years ago)
Author:
vboxsync
Message:

AudioMixBuffer: Fixed bug in AudioMixBufPeekResampling where we'd poentially overflow the output buffer. bugref:9890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp

    r88435 r88889  
    20352035        /* Rate conversion into temporary buffer. */
    20362036        int64_t  ai64DstRate[1024];
    2037         uint32_t cSrcFrames = RT_MIN(pMixBuf->cFrames - offSrcFrame, cMaxSrcFrames);
    2038         uint32_t const cDstFrames = pState->Rate.pfnResample(ai64DstRate, RT_ELEMENTS(ai64DstRate) / pState->cDstChannels,
     2037        uint32_t cSrcFrames    = RT_MIN(pMixBuf->cFrames - offSrcFrame, cMaxSrcFrames);
     2038        uint32_t cMaxDstFrames = RT_MIN(RT_ELEMENTS(ai64DstRate) / pState->cDstChannels, cbDst / pState->cbDstFrame);
     2039        uint32_t const cDstFrames = pState->Rate.pfnResample(ai64DstRate, cMaxDstFrames,
    20392040                                                            &pMixBuf->pFrames[offSrcFrame].i64LSample, cSrcFrames, &cSrcFrames,
    20402041                                                            &pState->Rate);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette