Changeset 49426 in vbox for trunk/src/VBox
- Timestamp:
- Nov 8, 2013 4:34:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r48070 r49426 836 836 } 837 837 838 static int vmmdevVerifyPointerShape(VMMDevReqMousePointer *pReq) 839 { 840 /* Should be enough for most mouse pointers. */ 841 if (pReq->width > 8192 || pReq->height > 8192) 842 return VERR_INVALID_PARAMETER; 843 844 uint32_t cbShape = (pReq->width + 7) / 8 * pReq->height; /* size of the AND mask */ 845 cbShape = ((cbShape + 3) & ~3) + pReq->width * 4 * pReq->height; /* + gap + size of the XOR mask */ 846 if (RT_UOFFSETOF(VMMDevReqMousePointer, pointerData) + cbShape > pReq->header.size) 847 return VERR_INVALID_PARAMETER; 848 849 return VINF_SUCCESS; 850 } 838 851 839 852 /** … … 871 884 if (fShape) 872 885 { 886 int rc = vmmdevVerifyPointerShape(pReq); 887 if (RT_FAILURE(rc)) 888 return rc; 889 873 890 pThis->pDrv->pfnUpdatePointerShape(pThis->pDrv, 874 891 fVisible,
Note:
See TracChangeset
for help on using the changeset viewer.