Changeset 90780 in vbox
- Timestamp:
- Aug 23, 2021 9:25:17 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146415
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp
r90489 r90780 2027 2027 REQ_CHECK_SIZES(SUP_IOCTL_SET_VM_FOR_FAST); 2028 2028 REQ_CHECK_EXPR_FMT( !pReq->u.In.pVMR0 2029 || ( VALID_PTR(pReq->u.In.pVMR0)2029 || ( RT_VALID_PTR(pReq->u.In.pVMR0) 2030 2030 && !((uintptr_t)pReq->u.In.pVMR0 & (PAGE_SIZE - 1))), 2031 2031 ("SUP_IOCTL_SET_VM_FOR_FAST: pVMR0=%p!\n", pReq->u.In.pVMR0)); … … 3044 3044 */ 3045 3045 AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER); 3046 AssertMsgReturn( VALID_PTR(pObj)&& pObj->u32Magic == SUPDRVOBJ_MAGIC,3046 AssertMsgReturn(RT_VALID_PTR(pObj) && pObj->u32Magic == SUPDRVOBJ_MAGIC, 3047 3047 ("Invalid pvObj=%p magic=%#x (expected %#x)\n", pvObj, pObj ? pObj->u32Magic : 0, SUPDRVOBJ_MAGIC), 3048 3048 VERR_INVALID_PARAMETER); … … 3152 3152 */ 3153 3153 AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER); 3154 AssertMsgReturn( VALID_PTR(pObj) && pObj->u32Magic == SUPDRVOBJ_MAGIC,3154 AssertMsgReturn(RT_VALID_PTR(pObj) && pObj->u32Magic == SUPDRVOBJ_MAGIC, 3155 3155 ("Invalid pvObj=%p magic=%#x (exepcted %#x)\n", pvObj, pObj ? pObj->u32Magic : 0, SUPDRVOBJ_MAGIC), 3156 3156 VERR_INVALID_PARAMETER); … … 5223 5223 return rc; 5224 5224 } 5225 Assert( VALID_PTR(pImage->pvImage) || RT_FAILURE(rc));5225 Assert(RT_VALID_PTR(pImage->pvImage) || RT_FAILURE(rc)); 5226 5226 5227 5227 /* -
trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
r87709 r90780 336 336 */ 337 337 #define SUP_IS_SESSION_VALID(pSession) \ 338 ( VALID_PTR(pSession) \338 ( RT_VALID_PTR(pSession) \ 339 339 && pSession->u32Cookie == BIRD_INV) 340 340 … … 346 346 */ 347 347 #define SUP_IS_DEVEXT_VALID(pDevExt) \ 348 ( VALID_PTR(pDevExt)\348 ( RT_VALID_PTR(pDevExt) \ 349 349 && pDevExt->u32Cookie == BIRD) 350 350 -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r90489 r90780 177 177 * initialized at this point. 178 178 */ 179 if (! VALID_PTR(pPreInitData))179 if (!RT_VALID_PTR(pPreInitData)) 180 180 return VERR_INVALID_POINTER; 181 181 if (g_fPreInited || g_cInits > 0) -
trunk/src/VBox/HostDrivers/Support/SUPR0IdcClient.c
r82968 r90780 122 122 * session and version values actually makes sense. 123 123 */ 124 if ( VALID_PTR(Req.u.Out.pSession)124 if ( RT_VALID_PTR(Req.u.Out.pSession) 125 125 && Req.u.Out.uSessionVersion >= uMinVersion 126 126 && (Req.u.Out.uSessionVersion & UINT32_C(0xffff0000)) == (SUPDRV_IDC_VERSION & UINT32_C(0xffff0000))) … … 205 205 { 206 206 PSUPDRVIDCHANDLE pHandle = ASMAtomicUoReadPtrT(&g_pMainHandle, PSUPDRVIDCHANDLE); 207 if ( 208 && 207 if ( RT_VALID_PTR(pHandle) 208 && pHandle->s.pSession == pSession) 209 209 return pHandle; 210 210 return NULL; -
trunk/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp
r83033 r90780 1051 1051 { 1052 1052 const char *pszMsg = va_arg(va, const char *); 1053 size_t cchMsg = VALID_PTR(pszMsg) ? suplibHardenedStrLen(pszMsg) : 0;1053 size_t cchMsg = RT_VALID_PTR(pszMsg) ? suplibHardenedStrLen(pszMsg) : 0; 1054 1054 if (cchMsg >= cbErr) 1055 1055 cchMsg = cbErr - 1; -
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r89018 r90780 956 956 * Some quick validations. 957 957 */ 958 if (RT_UNLIKELY(! VALID_PTR(pReq)))958 if (RT_UNLIKELY(!RT_VALID_PTR(pReq))) 959 959 return VERR_INVALID_POINTER; 960 960 … … 962 962 if (pSession) 963 963 { 964 if (RT_UNLIKELY(! VALID_PTR(pSession)))964 if (RT_UNLIKELY(!RT_VALID_PTR(pSession))) 965 965 return VERR_INVALID_PARAMETER; 966 966 if (RT_UNLIKELY(pSession->pDevExt != &g_DevExt)) -
trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
r87700 r90780 476 476 * Some quick validations. 477 477 */ 478 if (RT_UNLIKELY(! VALID_PTR(pReq)))478 if (RT_UNLIKELY(!RT_VALID_PTR(pReq))) 479 479 return VERR_INVALID_POINTER; 480 480 … … 482 482 if (pSession) 483 483 { 484 if (RT_UNLIKELY(! VALID_PTR(pReq->pSession)))484 if (RT_UNLIKELY(!RT_VALID_PTR(pReq->pSession))) 485 485 return VERR_INVALID_PARAMETER; 486 486 if (RT_UNLIKELY(pSession->pDevExt != &g_VBoxDrvFreeBSDDevExt)) -
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r89370 r90780 739 739 * Some quick validations. 740 740 */ 741 if (RT_UNLIKELY(! VALID_PTR(pReq)))741 if (RT_UNLIKELY(!RT_VALID_PTR(pReq))) 742 742 return VERR_INVALID_POINTER; 743 743 … … 745 745 if (pSession) 746 746 { 747 if (RT_UNLIKELY(! VALID_PTR(pSession)))747 if (RT_UNLIKELY(!RT_VALID_PTR(pSession))) 748 748 return VERR_INVALID_PARAMETER; 749 749 if (RT_UNLIKELY(pSession->pDevExt != &g_DevExt)) -
trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
r88169 r90780 862 862 * Some quick validations. 863 863 */ 864 if (RT_UNLIKELY(! VALID_PTR(pReq)))864 if (RT_UNLIKELY(!RT_VALID_PTR(pReq))) 865 865 return VERR_INVALID_POINTER; 866 866 … … 868 868 if (pSession) 869 869 { 870 if (RT_UNLIKELY(! VALID_PTR(pSession)))870 if (RT_UNLIKELY(!RT_VALID_PTR(pSession))) 871 871 return VERR_INVALID_PARAMETER; 872 872 if (RT_UNLIKELY(pSession->pDevExt != &g_DevExt)) -
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r87700 r90780 1475 1475 /* Verify the pDevExt in the session. */ 1476 1476 if ( pStack->Parameters.DeviceIoControl.IoControlCode != SUPDRV_IDC_REQ_CONNECT 1477 ? VALID_PTR(pSession) && pSession->pDevExt == pDevExt1477 ? RT_VALID_PTR(pSession) && pSession->pDevExt == pDevExt 1478 1478 : !pSession 1479 1479 )
Note:
See TracChangeset
for help on using the changeset viewer.