mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
See ChangeLog: Wed Sep 6 14:59:09 CEST 2000 Werner Koch
This commit is contained in:
parent
74b7fe6a7e
commit
d14ecc1759
15 changed files with 174 additions and 44 deletions
|
@ -1,3 +1,11 @@
|
|||
Wed Sep 6 14:59:09 CEST 2000 Werner Koch <wk@openit.de>
|
||||
|
||||
* secmem.c (secmem_realloc): check for failed secmem_malloc. By
|
||||
Matt Kraai.
|
||||
|
||||
* strgutil.c (utf8_to_native): Fixed null ptr problem. By
|
||||
Giampaolo Tomassoni.
|
||||
|
||||
Thu Jul 27 10:02:38 CEST 2000 Werner Koch <wk@openit.de>
|
||||
|
||||
* iobuf.c: Use setmode() at several places to set stdin and stdout
|
||||
|
|
|
@ -347,9 +347,11 @@ secmem_realloc( void *p, size_t newsize )
|
|||
if( newsize < size )
|
||||
return p; /* it is easier not to shrink the memory */
|
||||
a = secmem_malloc( newsize );
|
||||
memcpy(a, p, size);
|
||||
memset((char*)a+size, 0, newsize-size);
|
||||
secmem_free(p);
|
||||
if ( a ) {
|
||||
memcpy(a, p, size);
|
||||
memset((char*)a+size, 0, newsize-size);
|
||||
secmem_free(p);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
|
|
|
@ -424,7 +424,8 @@ utf8_to_native( const char *string, size_t length )
|
|||
case 0 : n++; if( p ) *p++ = '0'; break;
|
||||
default: n += 3;
|
||||
sprintf( p, "x%02x", *s );
|
||||
p += 3;
|
||||
if ( p )
|
||||
p += 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue