Changeset 51042 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Apr 10, 2014 8:05:24 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
r51013 r51042 1557 1557 case VBOXCMDVBVA_OPTYPE_SYSMEMCMD: 1558 1558 { 1559 if (cbCmd < sizeof (VBOXCMDVBVA_SYSMEMCMD)) 1560 { 1561 WARN(("invalid command size")); 1562 return -1; 1563 } 1559 1564 VBOXCMDVBVA_SYSMEMCMD *pSysmemCmd = (VBOXCMDVBVA_SYSMEMCMD*)pCmd; 1560 1565 const VBOXCMDVBVA_HDR *pRealCmdHdr; … … 1700 1705 PDMDevHlpPhysReleasePageMappingLock(pDevIns, &Lock); 1701 1706 return i8Result; 1707 } 1708 case VBOXCMDVBVA_OPTYPE_COMPLEXCMD: 1709 { 1710 Assert(cbCmd >= sizeof (VBOXCMDVBVA_HDR)); 1711 ++pCmd; 1712 cbCmd -= sizeof (*pCmd); 1713 uint32_t cbCurCmd = 0; 1714 for ( ; cbCmd; cbCmd -= cbCurCmd, pCmd = (VBOXCMDVBVA_HDR*)(((uint8_t*)pCmd) + cbCurCmd)) 1715 { 1716 if (cbCmd < sizeof (VBOXCMDVBVA_HDR)) 1717 { 1718 WARN(("invalid command size")); 1719 return -1; 1720 } 1721 1722 cbCurCmd = pCmd->u32FenceID; 1723 if (cbCmd < cbCurCmd) 1724 { 1725 WARN(("invalid command size")); 1726 return -1; 1727 } 1728 1729 int8_t i8Result = vboxVDMACrCmdVbvaProcess(pVdma, pCmd, cbCurCmd); 1730 if (i8Result < 0) 1731 { 1732 WARN(("vboxVDMACrCmdVbvaProcess failed")); 1733 return i8Result; 1734 } 1735 } 1736 return 0; 1702 1737 } 1703 1738 default:
Note:
See TracChangeset
for help on using the changeset viewer.