VirtualBox

Changeset 81210 in vbox for trunk


Ignore:
Timestamp:
Oct 10, 2019 11:21:37 AM (5 years ago)
Author:
vboxsync
Message:

Check if surface handle is valid, bugref:9570

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp

    r79365 r81210  
    25622562{
    25632563    VBoxVHWASurfaceBase *pSurf = handle2Surface(pCmd->u.in.hSurf);
     2564    AssertReturn(pSurf, VERR_INVALID_PARAMETER);
    25642565    VBoxVHWASurfList *pList = pSurf->getComplexList();
    25652566    Assert(pSurf->handle() != VBOXVHWA_SURFHANDLE_INVALID);
     
    26402641{
    26412642    VBoxVHWASurfaceBase *pSurf = handle2Surface(pCmd->u.in.hSurf);
     2643    AssertReturn(pSurf, VERR_INVALID_PARAMETER);
    26422644    VBOXQGLLOG_ENTER(("pSurf (0x%x)\n",pSurf));
     2645
    26432646    vboxCheckUpdateAddress (pSurf, pCmd->u.in.offSurface);
    26442647    if (pCmd->u.in.rectValid)
     
    26532656{
    26542657    VBoxVHWASurfaceBase *pSurf = handle2Surface(pCmd->u.in.hSurf);
     2658    AssertReturn(pSurf, VERR_INVALID_PARAMETER);
    26552659#ifdef DEBUG_misha
    26562660    /* for performance reasons we should receive unlock for visible surfaces only
     
    27002704{
    27012705    VBoxVHWASurfaceBase *pTargSurf = handle2Surface(pCmd->u.in.hTargSurf);
     2706    AssertReturn(pTargSurf, VERR_INVALID_PARAMETER);
    27022707    VBoxVHWASurfaceBase *pCurrSurf = handle2Surface(pCmd->u.in.hCurrSurf);
    2703     VBOXQGLLOG_ENTER(("pTargSurf (0x%x), pCurrSurf (0x%x)\n",pTargSurf,pCurrSurf));
     2708    AssertReturn(pCurrSurf, VERR_INVALID_PARAMETER);
     2709    VBOXQGLLOG_ENTER(("pTargSurf (0x%x), pCurrSurf (0x%x)\n", pTargSurf, pCurrSurf));
    27042710    vboxCheckUpdateAddress (pCurrSurf, pCmd->u.in.offCurrSurface);
    27052711    vboxCheckUpdateAddress (pTargSurf, pCmd->u.in.offTargSurface);
     
    28112817{
    28122818    VBoxVHWASurfaceBase *pSrcSurf = handle2Surface(pCmd->u.in.hSrcSurf);
     2819    AssertReturn(pSrcSurf, VERR_INVALID_PARAMETER);
    28132820    VBoxVHWASurfList *pList = pSrcSurf->getComplexList();
    28142821    vboxCheckUpdateAddress (pSrcSurf, pCmd->u.in.offSrcSurface);
     
    28192826    {
    28202827        pDstSurf = handle2Surface(pCmd->u.in.hDstSurf);
     2828        AssertReturn(pDstSurf, VERR_INVALID_PARAMETER);
    28212829        vboxCheckUpdateAddress (pDstSurf, pCmd->u.in.offDstSurface);
    28222830        VBOXQGLLOG(("pDstSurf (0x%x)\n",pDstSurf));
     
    28452853    if (pCmd->u.in.xFlags & VBOXVHWACMD_SURF_OVERLAY_UPDATE_F_DSTMEMRECT)
    28462854    {
     2855        AssertReturn(pDstSurf, VERR_INVALID_PARAMETER);
    28472856        QRect r = VBOXVHWA_CONSTRUCT_QRECT_FROM_RECTL_WH(&pCmd->u.in.xUpdatedDstMemRect);
    28482857        pDstSurf->updatedMem(&r);
     
    28782887{
    28792888    VBoxVHWASurfaceBase *pDstSurf = handle2Surface(pCmd->u.in.hDstSurf);
     2889    AssertReturn(pDstSurf, VERR_INVALID_PARAMETER);
    28802890    VBoxVHWASurfaceBase *pSrcSurf = handle2Surface(pCmd->u.in.hSrcSurf);
     2891    AssertReturn(pSrcSurf, VERR_INVALID_PARAMETER);
    28812892
    28822893    VBOXQGLLOG_ENTER(("pDstSurf (0x%x), pSrcSurf (0x%x)\n",pDstSurf,pSrcSurf));
     
    29192930{
    29202931    VBoxVHWASurfaceBase *pSurf = handle2Surface(pCmd->u.in.hSurf);
     2932    AssertReturn(pSurf, VERR_INVALID_PARAMETER);
    29212933    VBOXQGLLOG_ENTER(("pSurf (0x%x)\n", pSurf));
    29222934
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