Changeset 71588 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Mar 31, 2018 1:47:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
r71194 r71588 2559 2559 { 2560 2560 if ( cbDstLine <= cbVRamSize 2561 && (uintptr_t)pb SrcStart - (uintptr_t)pbRam <= cbVRamSize - cbDstLine2561 && (uintptr_t)pbDstStart - (uintptr_t)pbRam <= cbVRamSize - cbDstLine 2562 2562 && (uintptr_t)pbSrcStart - (uintptr_t)pbRam <= cbVRamSize - cbDstLine) 2563 2563 memcpy(pbDstStart, pbSrcStart, cbDstLine); … … 2715 2715 uint32_t cbTransfered = 0; 2716 2716 int rc = VINF_SUCCESS; 2717 2718 if (pTransfer->fFlags & VBOXVDMACMD_DMA_BPB_TRANSFER_F_SRC_VRAMOFFSET) 2719 { 2720 if (RT_LIKELY( pTransfer->cbTransferSize <= pVGAState->vram_size 2721 && pTransfer->Src.offVramBuf <= pVGAState->vram_size - pTransfer->cbTransferSize)) 2722 { /* likely */ } 2723 else 2724 return VERR_INVALID_PARAMETER; 2725 } 2726 2727 if (pTransfer->fFlags & VBOXVDMACMD_DMA_BPB_TRANSFER_F_DST_VRAMOFFSET) 2728 { 2729 if (RT_LIKELY( pTransfer->cbTransferSize <= pVGAState->vram_size 2730 && pTransfer->Dst.offVramBuf <= pVGAState->vram_size - pTransfer->cbTransferSize)) 2731 { /* likely */ } 2732 else 2733 return VERR_INVALID_PARAMETER; 2734 } 2735 2717 2736 do 2718 2737 {
Note:
See TracChangeset
for help on using the changeset viewer.