VirtualBox

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


Ignore:
Timestamp:
Apr 2, 2020 3:29:09 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136820
Message:

VMSVGA: Skip light source if index is wrong, bugref:9689

Location:
trunk/src/VBox/Devices/Graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp

    r82968 r83513  
    54595459
    54605460    LogFunc(("vmsvga3dSetLightData cid=%u index=%d type=%d\n", cid, index, pData->type));
     5461    AssertReturn(index < SVGA3D_MAX_LIGHTS, VERR_INVALID_PARAMETER);
    54615462
    54625463    PVMSVGA3DCONTEXT pContext;
     
    54675468
    54685469    /* Store for vm state save/restore */
    5469     if (index < SVGA3D_MAX_LIGHTS)
    5470     {
    5471         pContext->state.aLightData[index].fValidData = true;
    5472         pContext->state.aLightData[index].data = *pData;
    5473     }
    5474     else
    5475         AssertFailed();
     5470    pContext->state.aLightData[index].fValidData = true;
     5471    pContext->state.aLightData[index].data = *pData;
    54765472
    54775473    if (    pData->attenuation0 < 0.0f
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp

    r82968 r83513  
    46444644
    46454645    Log(("vmsvga3dSetLightData %x index=%d\n", cid, index));
     4646    AssertReturn(index < SVGA3D_MAX_LIGHTS, VERR_INVALID_PARAMETER);
    46464647
    46474648    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
     
    46694670
    46704671    /* Store for vm state save/restore */
    4671     if (index < SVGA3D_MAX_LIGHTS)
    4672     {
    4673         pContext->state.aLightData[index].fValidData = true;
    4674         pContext->state.aLightData[index].data = *pData;
    4675     }
    4676     else
    4677         AssertFailed();
     4672    pContext->state.aLightData[index].fValidData = true;
     4673    pContext->state.aLightData[index].data = *pData;
    46784674
    46794675    light.Diffuse.r     = pData->diffuse[0];
Note: See TracChangeset for help on using the changeset viewer.

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