Changeset 43486 in vbox
- Timestamp:
- Oct 1, 2012 11:50:44 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
r41974 r43486 238 238 int rc = VINF_NOT_SUPPORTED; 239 239 240 cbDmaCmd = pCmdDr->cbBuf; 241 240 242 if (pCmdDr->fFlags & VBOXVDMACBUF_FLAG_BUF_FOLLOWS_DR) 241 243 { … … 246 248 } 247 249 248 cbDmaCmd = pCmdDr->cbBuf;249 250 if (cbDmaCmd < cbCmdDr - sizeof (*pCmdDr) - VBOXVDMACMD_HEADER_SIZE()) 250 251 { … … 254 255 255 256 pDmaCmd = VBOXVDMACBUF_DR_TAIL(pCmdDr, VBOXVDMACMD); 257 } 258 else if (pCmdDr->fFlags & VBOXVDMACBUF_FLAG_BUF_VRAM_OFFSET) 259 { 260 VBOXVIDEOOFFSET offBuf = pCmdDr->Location.offVramBuf; 261 if (offBuf + cbDmaCmd > pVdma->pVGAState->vram_size) 262 { 263 AssertMsgFailed(("invalid command buffer data from offset!")); 264 return VERR_INVALID_PARAMETER; 265 } 266 pDmaCmd = (VBOXVDMACMD*)(pvRam + offBuf); 256 267 } 257 268
Note:
See TracChangeset
for help on using the changeset viewer.