VirtualBox

Ignore:
Timestamp:
Jun 8, 2011 3:09:14 PM (14 years ago)
Author:
vboxsync
Message:

1 million rectangles ought to be enough for anybody...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r37381 r37384  
    14871487                VMMDevVideoSetVisibleRegion *ptr = (VMMDevVideoSetVisibleRegion *)pRequestHeader;
    14881488
    1489                 if (pRequestHeader->size != sizeof(VMMDevVideoSetVisibleRegion) + (uint64_t)ptr->cRect * sizeof(RTRECT) - sizeof(RTRECT))
    1490                 {
    1491                     Log(("VMMDevReq_VideoSetVisibleRegion request size too small!!!\n"));
     1489                if (   ptr->cRects > _1M /* restrict to sane range */
     1490                    || pRequestHeader->size != sizeof(VMMDevVideoSetVisibleRegion) + ptr->cRect * sizeof(RTRECT) - sizeof(RTRECT))
     1491                {
     1492                    Log(("VMMDevReq_VideoSetVisibleRegion: cRects=%#x doesn't match size=%#x or is out of bounds\n",
     1493                         ptr->cRects, pRequestHeader->size));
    14921494                    pRequestHeader->rc = VERR_INVALID_PARAMETER;
    14931495                }
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