diff --git a/util/ChangeLog b/util/ChangeLog index adb380b60..59a76191c 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,8 @@ +2002-11-06 David Shaw + + * secmem.c (secmem_free, secmem_term): Use wipememory2() instead + of memset() to overwrite secure memory. + 2002-10-28 Werner Koch * w32reg.c (read_w32_registry_string): Fixed expanding of the diff --git a/util/secmem.c b/util/secmem.c index d4eecbb3e..48bcc7f44 100644 --- a/util/secmem.c +++ b/util/secmem.c @@ -406,10 +406,10 @@ secmem_free( void *a ) size = mb->size; /* This does not make much sense: probably this memory is held in the * cache. We do it anyway: */ - memset(mb, 0xff, size ); - memset(mb, 0xaa, size ); - memset(mb, 0x55, size ); - memset(mb, 0x00, size ); + wipememory2(mb, 0xff, size ); + wipememory2(mb, 0xaa, size ); + wipememory2(mb, 0x55, size ); + wipememory2(mb, 0x00, size ); mb->size = size; mb->u.next = unused_blocks; unused_blocks = mb; @@ -439,10 +439,10 @@ secmem_term() if( !pool_okay ) return; - memset( pool, 0xff, poolsize); - memset( pool, 0xaa, poolsize); - memset( pool, 0x55, poolsize); - memset( pool, 0x00, poolsize); + wipememory2( pool, 0xff, poolsize); + wipememory2( pool, 0xaa, poolsize); + wipememory2( pool, 0x55, poolsize); + wipememory2( pool, 0x00, poolsize); #ifdef HAVE_MMAP if( pool_is_mmapped ) munmap( pool, poolsize );