aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/alloc/secmem.h2
-rw-r--r--src/lib/utils/mem_ops.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/alloc/secmem.h b/src/lib/alloc/secmem.h
index 2f4d65f33..706ea037f 100644
--- a/src/lib/alloc/secmem.h
+++ b/src/lib/alloc/secmem.h
@@ -57,7 +57,7 @@ class secure_allocator
void deallocate(pointer p, size_type n)
{
- clear_mem(p, n);
+ zero_mem(p, n);
#if defined(BOTAN_HAS_LOCKING_ALLOCATOR)
if(mlock_allocator::instance().deallocate(p, n, sizeof(T)))
diff --git a/src/lib/utils/mem_ops.h b/src/lib/utils/mem_ops.h
index be617ff19..05b2c22a5 100644
--- a/src/lib/utils/mem_ops.h
+++ b/src/lib/utils/mem_ops.h
@@ -27,7 +27,7 @@ BOTAN_DLL void zero_mem(void* ptr, size_t n);
*/
template<typename T> inline void clear_mem(T* ptr, size_t n)
{
- zero_mem(ptr, sizeof(T)*n);
+ std::memset(ptr, 0, sizeof(T)*n);
}
/**