sanitizing_allocator::deallocate() fixed to calculate proper buffer size for non-byte arrays
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user