From 6899f2a7b08b379837133ca94d2424efee8075eb Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 17 May 2016 11:07:38 +0200 Subject: [PATCH] sanitizing_allocator::deallocate() fixed to calculate proper buffer size for non-byte arrays --- include/WinStd/Common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/WinStd/Common.h b/include/WinStd/Common.h index 62161f3c..55a807a8 100644 --- a/include/WinStd/Common.h +++ b/include/WinStd/Common.h @@ -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); }