diff options
author | David Shaw <[email protected]> | 2002-11-06 22:51:44 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2002-11-06 22:51:44 +0000 |
commit | d771dd272dbb29ff076e4506045105931e015354 (patch) | |
tree | c35d4dce6219275ba5f130451784779ba6a34690 /util/secmem.c | |
parent | * util.h: Add wipememory2() macro (same as wipememory, but can specify the (diff) | |
download | gnupg-d771dd272dbb29ff076e4506045105931e015354.tar.gz gnupg-d771dd272dbb29ff076e4506045105931e015354.zip |
* w32reg.c (read_w32_registry_string): Fixed expanding of the environment
buffer; didn't worked at all. Reported by Thijmen Klok. From Werner on
stable branch.
* secmem.c (secmem_free, secmem_term): Use wipememory2() instead of
memset() to overwrite secure memory
* iobuf.c (direct_open): Handle mode 'b' if O_BINARY is available. From
Werner on stable branch.
* fileutil.c: Comment from stable branch.
Diffstat (limited to '')
-rw-r--r-- | util/secmem.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/secmem.c b/util/secmem.c index d077fed17..0a0931afc 100644 --- a/util/secmem.c +++ b/util/secmem.c @@ -408,10 +408,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; @@ -441,10 +441,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 ); |