Changeset 73097 in vbox for trunk/src/VBox/Runtime/common/crypto
- Timestamp:
- Jul 12, 2018 9:06:33 PM (7 years ago)
- Location:
- trunk/src/VBox/Runtime/common/crypto
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/crypto/digest-core.cpp
r69111 r73097 97 97 AssertReturn(pDesc->pfnNew || offHash, VERR_INVALID_PARAMETER); 98 98 AssertReturn(!pDesc->pfnNew || (pDesc->pfnFree && pDesc->pfnInit && pDesc->pfnClone), VERR_INVALID_PARAMETER); 99 PRTCRDIGESTINT pThis = (PRTCRDIGESTINT)RTMemAllocZ(RT_ OFFSETOF(RTCRDIGESTINT, abState[offHash + pDesc->cbHash]));99 PRTCRDIGESTINT pThis = (PRTCRDIGESTINT)RTMemAllocZ(RT_UOFFSETOF_DYN(RTCRDIGESTINT, abState[offHash + pDesc->cbHash])); 100 100 if (pThis) 101 101 { … … 140 140 int rc = VINF_SUCCESS; 141 141 uint32_t const offHash = hSrc->offHash; 142 PRTCRDIGESTINT pThis = (PRTCRDIGESTINT)RTMemAllocZ(RT_ OFFSETOF(RTCRDIGESTINT, abState[offHash + hSrc->pDesc->cbHash]));142 PRTCRDIGESTINT pThis = (PRTCRDIGESTINT)RTMemAllocZ(RT_UOFFSETOF_DYN(RTCRDIGESTINT, abState[offHash + hSrc->pDesc->cbHash])); 143 143 if (pThis) 144 144 { -
trunk/src/VBox/Runtime/common/crypto/pkix-signature-core.cpp
r69111 r73097 107 107 */ 108 108 int rc = VINF_SUCCESS; 109 PRTCRPKIXSIGNATUREINT pThis = (PRTCRPKIXSIGNATUREINT)RTMemAllocZ(RT_OFFSETOF(RTCRPKIXSIGNATUREINT, abState[pDesc->cbState])); 109 PRTCRPKIXSIGNATUREINT pThis = (PRTCRPKIXSIGNATUREINT)RTMemAllocZ(RT_UOFFSETOF_DYN(RTCRPKIXSIGNATUREINT, 110 abState[pDesc->cbState])); 110 111 if (pThis) 111 112 { … … 160 161 pThis->pDesc->pfnDelete(pThis->pDesc, pThis->abState, pThis->fSigning); 161 162 162 size_t cbToWipe = RT_ OFFSETOF(RTCRPKIXSIGNATUREINT, abState[pThis->pDesc->cbState]);163 size_t cbToWipe = RT_UOFFSETOF_DYN(RTCRPKIXSIGNATUREINT, abState[pThis->pDesc->cbState]); 163 164 RTMemWipeThoroughly(pThis, cbToWipe, 6); 164 165 -
trunk/src/VBox/Runtime/common/crypto/store-inmem.cpp
r69111 r73097 120 120 { 121 121 int rc; 122 PRTCRSTOREINMEMCERT pEntry = (PRTCRSTOREINMEMCERT)RTMemAllocZ(RT_UOFFSETOF (RTCRSTOREINMEMCERT, abEncoded[cbSrc]));122 PRTCRSTOREINMEMCERT pEntry = (PRTCRSTOREINMEMCERT)RTMemAllocZ(RT_UOFFSETOF_DYN(RTCRSTOREINMEMCERT, abEncoded[cbSrc])); 123 123 if (pEntry) 124 124 {
Note:
See TracChangeset
for help on using the changeset viewer.