Changeset 102490 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Dec 6, 2023 12:34:17 AM (12 months ago)
- Location:
- trunk/src/VBox/Runtime/common/crypto
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/crypto/shacrypt-256.cpp.h
r102488 r102490 110 110 */ 111 111 size_t const cbSeqP = cchPhrase; 112 uint8_t *pabSeqP = (uint8_t *)RTMem Dup(pszPhrase, cbSeqP + 1);/* +1 because the password may be empty */112 uint8_t *pabSeqP = (uint8_t *)RTMemTmpAllocZ(cbSeqP + 1); /* +1 because the password may be empty */ 113 113 uint8_t *pb = pabSeqP; 114 114 AssertPtrReturn(pabSeqP, VERR_NO_MEMORY); … … 190 190 RTMemWipeThoroughly(abDigestTemp, RTSHA256_HASH_SIZE, 3); 191 191 RTMemWipeThoroughly(pabSeqP, cbSeqP, 3); 192 RTMem Free(pabSeqP);192 RTMemTmpFree(pabSeqP); 193 193 #if 0 194 194 RTMemWipeThoroughly(pabSeqS, cbSeqS, 3); -
trunk/src/VBox/Runtime/common/crypto/shacrypt-512.cpp.h
r102488 r102490 111 111 */ 112 112 size_t const cbSeqP = cchPhrase; 113 uint8_t *pabSeqP = (uint8_t *)RTMem Dup(pszPhrase, cbSeqP + 1);/* +1 because the password may be empty */113 uint8_t *pabSeqP = (uint8_t *)RTMemTmpAllocZ(cbSeqP + 1); /* +1 because the password may be empty */ 114 114 uint8_t *pb = pabSeqP; 115 115 AssertPtrReturn(pabSeqP, VERR_NO_MEMORY); … … 191 191 RTMemWipeThoroughly(abDigestTemp, RTSHA512_HASH_SIZE, 3); 192 192 RTMemWipeThoroughly(pabSeqP, cbSeqP, 3); 193 RTMem Free(pabSeqP);193 RTMemTmpFree(pabSeqP); 194 194 #if 0 195 195 RTMemWipeThoroughly(pabSeqS, cbSeqS, 3);
Note:
See TracChangeset
for help on using the changeset viewer.