diff options
author | Werner Koch <wk@gnupg.org> | 1998-07-29 21:35:05 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-07-29 21:35:05 +0200 |
commit | 5ae562b41d9e3ec965643b902bf8593c8ca5a2d7 (patch) | |
tree | 059ed09c380b3f534479add19933dbe9a7a401c9 /util/secmem.c | |
parent | changed trustdb design (diff) | |
download | gnupg2-5ae562b41d9e3ec965643b902bf8593c8ca5a2d7.tar.xz gnupg2-5ae562b41d9e3ec965643b902bf8593c8ca5a2d7.zip |
edit-key is now complete
Diffstat (limited to 'util/secmem.c')
-rw-r--r-- | util/secmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/secmem.c b/util/secmem.c index 4721bcd91..d12621324 100644 --- a/util/secmem.c +++ b/util/secmem.c @@ -204,7 +204,7 @@ secmem_malloc( size_t size ) } /* allocate a new block */ if( (poollen + size <= poolsize) ) { - mb = pool + poollen; + mb = (void*)((char*)pool + poollen); poollen += size; mb->size = size; } @@ -240,7 +240,7 @@ secmem_realloc( void *p, size_t newsize ) return p; /* it is easier not to shrink the memory */ a = secmem_malloc( newsize ); memcpy(a, p, size); - memset(a+size, 0, newsize-size); + memset((char*)a+size, 0, newsize-size); secmem_free(p); return a; } @@ -271,7 +271,7 @@ secmem_free( void *a ) int m_is_secure( const void *p ) { - return p >= pool && p < (pool+poolsize); + return p >= pool && p < ((char*)pool+poolsize); } void |