mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-14 21:47:19 +02:00
* 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.
This commit is contained in:
parent
d941240b45
commit
d771dd272d
5 changed files with 31 additions and 12 deletions
|
@ -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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue