diff options
| -rw-r--r-- | gpgme/ChangeLog | 5 | ||||
| -rw-r--r-- | gpgme/key.c | 4 | 
2 files changed, 8 insertions, 1 deletions
| diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 8285ff85..a27204c6 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,8 @@ +2008-03-06  Marcus Brinkmann  <[email protected]> + +	* key.c (_gpgme_key_add_sig): Terminate UID in case SRC is NULL. +	Reported by Marc Mutz. +  2008-03-05  Marcus Brinkmann  <[email protected]>  	* decrypt.c (release_op_data): Release OPD->result.recipients. diff --git a/gpgme/key.c b/gpgme/key.c index 3dde670f..c9f48f87 100644 --- a/gpgme/key.c +++ b/gpgme/key.c @@ -252,7 +252,7 @@ _gpgme_key_add_sig (gpgme_key_t key, char *src)    assert (uid);	/* XXX */    /* We can malloc a buffer of the same length, because the converted -     string will never be larger. Actually we allocate it twice the +     string will never be larger.  Actually we allocate it twice the       size, so that we are able to store the parsed stuff there too.  */    sig = malloc (sizeof (*sig) + 2 * src_len + 3);    if (!sig) @@ -275,6 +275,8 @@ _gpgme_key_add_sig (gpgme_key_t key, char *src)  	parse_user_id (sig->uid, &sig->name, &sig->email,  		       &sig->comment, dst);      } +  else +    sig->uid = '\0';    if (!uid->signatures)      uid->signatures = sig; | 
