summaryrefslogtreecommitdiffstats
path: root/util/secmem.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-07-29 21:35:05 +0200
committerWerner Koch <wk@gnupg.org>1998-07-29 21:35:05 +0200
commit5ae562b41d9e3ec965643b902bf8593c8ca5a2d7 (patch)
tree059ed09c380b3f534479add19933dbe9a7a401c9 /util/secmem.c
parentchanged trustdb design (diff)
downloadgnupg2-5ae562b41d9e3ec965643b902bf8593c8ca5a2d7.tar.xz
gnupg2-5ae562b41d9e3ec965643b902bf8593c8ca5a2d7.zip
edit-key is now complete
Diffstat (limited to 'util/secmem.c')
-rw-r--r--util/secmem.c6
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