Changeset 95624 in vbox for trunk/src/VBox/Runtime/common/asn1
- Timestamp:
- Jul 13, 2022 8:31:41 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 152265
- Location:
- trunk/src/VBox/Runtime/common/asn1
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/asn1/asn1-ut-bitstring.cpp
r93115 r95624 345 345 346 346 347 RTDECL(int) RTAsn1BitString_InitWithData(PRTASN1BITSTRING pThis, void const *pvSrc, uint32_t cSrcBits, 348 PCRTASN1ALLOCATORVTABLE pAllocator) 349 { 350 RTAsn1BitString_Init(pThis, pAllocator); 351 Assert(pThis->pEncapsulated == NULL); 352 353 uint32_t cbToCopy = (cSrcBits + 7) / 8; 354 int rc = RTAsn1ContentAllocZ(&pThis->Asn1Core, cbToCopy + 1, pAllocator); 355 if (RT_SUCCESS(rc)) 356 { 357 pThis->cBits = cSrcBits; 358 uint8_t *pbDst = (uint8_t *)pThis->Asn1Core.uData.pu8; 359 pThis->uBits.pv = pbDst + 1; 360 *pbDst = 8 - (cSrcBits & 7); /* unused bits */ 361 memcpy(pbDst + 1, pvSrc, cbToCopy); 362 } 363 return rc; 364 } 365 366 347 367 RTDECL(int) RTAsn1BitString_Clone(PRTASN1BITSTRING pThis, PCRTASN1BITSTRING pSrc, PCRTASN1ALLOCATORVTABLE pAllocator) 348 368 { -
trunk/src/VBox/Runtime/common/asn1/asn1-ut-core.cpp
r93115 r95624 137 137 RTDECL(int) RTAsn1Core_CloneContent(PRTASN1CORE pThis, PCRTASN1CORE pSrc, PCRTASN1ALLOCATORVTABLE pAllocator) 138 138 { 139 return rtAsn1Core_CloneEx(pThis, pSrc, pAllocator, true /*fCo npyContent*/);139 return rtAsn1Core_CloneEx(pThis, pSrc, pAllocator, true /*fCopyContent*/); 140 140 } 141 141 … … 143 143 RTDECL(int) RTAsn1Core_CloneNoContent(PRTASN1CORE pThis, PCRTASN1CORE pSrc) 144 144 { 145 return rtAsn1Core_CloneEx(pThis, pSrc, NULL, false /*fCo npyContent*/);145 return rtAsn1Core_CloneEx(pThis, pSrc, NULL, false /*fCopyContent*/); 146 146 } 147 147 -
trunk/src/VBox/Runtime/common/asn1/asn1-ut-objid.cpp
r93115 r95624 337 337 338 338 339 RTDECL(int) RTAsn1ObjId_SetFromString(PRTASN1OBJID pThis, const char *pszObjId, PCRTASN1ALLOCATORVTABLE pAllocator) 340 { 341 RTAsn1ObjId_Delete(pThis); 342 int rc = RTAsn1ObjId_InitFromString(pThis, pszObjId, pAllocator); 343 if (RT_FAILURE(rc)) 344 RTAsn1ObjId_Init(pThis, pAllocator); 345 return rc; 346 } 347 348 339 349 RTDECL(int) RTAsn1ObjId_CompareWithString(PCRTASN1OBJID pThis, const char *pszRight) 340 350 {
Note:
See TracChangeset
for help on using the changeset viewer.