VirtualBox

Changeset 510 in vbox for trunk/src


Ignore:
Timestamp:
Feb 1, 2007 2:50:40 PM (18 years ago)
Author:
vboxsync
Message:

Fixed the VBVA buffer overwrite in the Linux guest video driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/xgraphics/vboxutils.c

    r430 r510  
    263263        }
    264264        /* Now copy the data into the buffer */
    265         if (off32Data + sizeof(cmdHdr) < VBVA_RING_BUFFER_SIZE)
     265        if (off32Free + sizeof(cmdHdr) < VBVA_RING_BUFFER_SIZE)
    266266        {
    267267            memcpy(&pMem->au8RingBuffer[off32Free], &cmdHdr,
     
    276276            CARD32 u32Second = sizeof(cmdHdr) - u32First;
    277277            memcpy(&pMem->au8RingBuffer[off32Free], &cmdHdr, u32First);
    278             memcpy(&pMem->au8RingBuffer[0], (void *)pu8Second, u32Second);
     278            if (u32Second)
     279                memcpy(&pMem->au8RingBuffer[0], (void *)pu8Second, u32Second);
    279280            pMem->off32Free = u32Second;
    280281        }
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