VirtualBox

Changeset 23118 in vbox for trunk/src


Ignore:
Timestamp:
Sep 18, 2009 9:54:50 AM (15 years ago)
Author:
vboxsync
Message:

DevVGA_VBVA.cpp: Fixed a too greedy memset in vbvaVHWAHHCommandCreate. (cbCmd=0 -> heap corruption.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r22729 r23118  
    1 /*
     1/** @file
    22 * VirtualBox Video Acceleration (VBVA).
    33 */
     
    330330    } dirtyRect;
    331331    memset(&dirtyRect, 0, sizeof(dirtyRect));
    332    
     332
    333333    bool fUpdate = false; /* Whether there were any updates. */
    334334
     
    456456
    457457    int rc = pVGAState->pDrv->pfnVBVAResize (pVGAState->pDrv, &pView->view, &pView->screen, pu8VRAM);
    458    
     458
    459459    /* @todo process VINF_VGA_RESIZE_IN_PROGRESS? */
    460    
     460
    461461    return rc;
    462462}
     
    532532                         + pShape->u32Width * 4 * pShape->u32Height;
    533533    }
    534    
     534
    535535    if (cbPointerData > cbShape - RT_OFFSETOF(VBVAMOUSEPOINTERSHAPE, au8Data))
    536536    {
     
    618618              pView->screen.u32Width,
    619619              pView->screen.u32Height,
    620               pView->screen.u16BitsPerPixel, 
     620              pView->screen.u16BitsPerPixel,
    621621              pView->screen.u16Flags));
    622622
     
    852852    if (pHdr)
    853853    {
    854         memset(pHdr, 0, sizeof(VBOXVHWACMD));
     854        memset(pHdr, 0, VBOXVHWACMD_HEADSIZE());
    855855        pHdr->cRefs = 1;
    856856        pHdr->rc = VERR_GENERAL_FAILURE;
     
    11651165            /* Guest submits an array of VBVAINFOVIEW structures. */
    11661166            VBVAINFOVIEW *pView = (VBVAINFOVIEW *)pvBuffer;
    1167            
     1167
    11681168            for (;
    11691169                 cbBuffer >= sizeof (VBVAINFOVIEW);
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