Changeset 30865 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
- Timestamp:
- Jul 15, 2010 8:56:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r30720 r30865 2784 2784 Status = STATUS_SUCCESS; 2785 2785 break; 2786 case VBOXESC_DBGPRINT: 2787 { 2788 /* use RT_OFFSETOF instead of sizeof since sizeof will give an aligned size that might 2789 * be bigger than the VBOXDISPIFESCAPE_DBGPRINT with a data containing just a few chars */ 2790 Assert(pEscape->PrivateDriverDataSize >= RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1])); 2791 /* only do DbgPrint when pEscape->PrivateDriverDataSize > RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]) 2792 * since == RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]) means the buffer contains just \0, 2793 * i.e. no need to print it */ 2794 if (pEscape->PrivateDriverDataSize > RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1])) 2795 { 2796 PVBOXDISPIFESCAPE_DBGPRINT pDbgPrint = (PVBOXDISPIFESCAPE_DBGPRINT)pEscapeHdr; 2797 /* ensure the last char is \0*/ 2798 *((uint8_t*)pDbgPrint + pEscape->PrivateDriverDataSize - 1) = '\0'; 2799 DbgPrint(pDbgPrint->aStringBuf); 2800 } 2801 Status = STATUS_SUCCESS; 2802 break; 2803 } 2786 2804 default: 2805 Assert(0); 2787 2806 drprintf((__FUNCTION__": unsupported escape code (0x%x)\n", pEscapeHdr->escapeCode)); 2788 2807 break;
Note:
See TracChangeset
for help on using the changeset viewer.