mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-04 20:38:50 +01:00
* secmem.c (secmem_free, secmem_term): Use wipememory2() instead of
memset() to overwrite secure memory.
This commit is contained in:
parent
49db742b75
commit
23ac2c1e0a
@ -1,3 +1,8 @@
|
|||||||
|
2002-11-06 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* secmem.c (secmem_free, secmem_term): Use wipememory2() instead
|
||||||
|
of memset() to overwrite secure memory.
|
||||||
|
|
||||||
2002-10-28 Werner Koch <wk@gnupg.org>
|
2002-10-28 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* w32reg.c (read_w32_registry_string): Fixed expanding of the
|
* w32reg.c (read_w32_registry_string): Fixed expanding of the
|
||||||
|
@ -406,10 +406,10 @@ secmem_free( void *a )
|
|||||||
size = mb->size;
|
size = mb->size;
|
||||||
/* This does not make much sense: probably this memory is held in the
|
/* This does not make much sense: probably this memory is held in the
|
||||||
* cache. We do it anyway: */
|
* cache. We do it anyway: */
|
||||||
memset(mb, 0xff, size );
|
wipememory2(mb, 0xff, size );
|
||||||
memset(mb, 0xaa, size );
|
wipememory2(mb, 0xaa, size );
|
||||||
memset(mb, 0x55, size );
|
wipememory2(mb, 0x55, size );
|
||||||
memset(mb, 0x00, size );
|
wipememory2(mb, 0x00, size );
|
||||||
mb->size = size;
|
mb->size = size;
|
||||||
mb->u.next = unused_blocks;
|
mb->u.next = unused_blocks;
|
||||||
unused_blocks = mb;
|
unused_blocks = mb;
|
||||||
@ -439,10 +439,10 @@ secmem_term()
|
|||||||
if( !pool_okay )
|
if( !pool_okay )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset( pool, 0xff, poolsize);
|
wipememory2( pool, 0xff, poolsize);
|
||||||
memset( pool, 0xaa, poolsize);
|
wipememory2( pool, 0xaa, poolsize);
|
||||||
memset( pool, 0x55, poolsize);
|
wipememory2( pool, 0x55, poolsize);
|
||||||
memset( pool, 0x00, poolsize);
|
wipememory2( pool, 0x00, poolsize);
|
||||||
#ifdef HAVE_MMAP
|
#ifdef HAVE_MMAP
|
||||||
if( pool_is_mmapped )
|
if( pool_is_mmapped )
|
||||||
munmap( pool, poolsize );
|
munmap( pool, poolsize );
|
||||||
|
Loading…
Reference in New Issue
Block a user