VirtualBox

Changeset 49783 in vbox


Ignore:
Timestamp:
Dec 5, 2013 9:27:52 AM (11 years ago)
Author:
vboxsync
Message:

DisplayImpl: DevVGA must not access framebuffer which has incorrect size.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r49474 r49783  
    204204private:
    205205
    206     void updateDisplayData(void);
     206    int updateDisplayData(void);
    207207
    208208#ifdef VBOX_WITH_CRHGSMI
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r49603 r49783  
    811811        {
    812812            /* Primary framebuffer has completed the resize. Update the connector data for VGA device. */
    813             updateDisplayData();
     813            int rc2 = updateDisplayData();
    814814
    815815            /* Check the framebuffer pixel format to setup the rendering in VGA device. */
     
    822822             * pixels from VRAM to the framebuffer.
    823823             */
    824             if (pFBInfo->fDisabled)
     824            if (pFBInfo->fDisabled || RT_FAILURE(rc2))
    825825                mpDrv->pUpPort->pfnSetRenderVRAM (mpDrv->pUpPort, false);
    826826            else
     
    31923192 *  @thread EMT
    31933193 */
    3194 void Display::updateDisplayData(void)
     3194int Display::updateDisplayData(void)
    31953195{
    31963196    LogRelFlowFunc(("\n"));
     
    31983198    /* the driver might not have been constructed yet */
    31993199    if (!mpDrv)
    3200         return;
     3200        return VINF_SUCCESS;
    32013201
    32023202#ifdef VBOX_STRICT
     
    32393239        AssertComRC (rc);
    32403240
     3241        if (   (width != mLastWidth && mLastWidth != 0)
     3242            || (height != mLastHeight && mLastHeight != 0))
     3243        {
     3244            LogRel(("updateDisplayData: size mismatch w %d(%d) h %d(%d)\n",
     3245                    width, mLastWidth, height, mLastHeight));
     3246            return VERR_INVALID_STATE;
     3247        }
     3248
    32413249        mpDrv->IConnector.pu8Data = (uint8_t *) address;
    32423250        mpDrv->IConnector.cbScanline = bytesPerLine;
     
    32553263    }
    32563264    LogRelFlowFunc(("leave\n"));
     3265    return VINF_SUCCESS;
    32573266}
    32583267
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