sanitizing_allocator::deallocate() fixed to calculate proper buffer size for non-byte arrays
This commit is contained in:
parent
010919ff24
commit
6899f2a7b0
@ -831,10 +831,10 @@ namespace winstd
|
||||
///
|
||||
/// Deallocate object at _Ptr sanitizing its content first
|
||||
///
|
||||
inline void deallocate(_In_ pointer _Ptr, _In_ size_type _Count)
|
||||
inline void deallocate(_In_ pointer _Ptr, _In_ size_type _Size)
|
||||
{
|
||||
// Sanitize then free.
|
||||
SecureZeroMemory(_Ptr, sizeof(_Ty)*_Count);
|
||||
SecureZeroMemory(_Ptr, _Size);
|
||||
::operator delete(_Ptr);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user