diff options
author | Marcus Brinkmann <[email protected]> | 2008-03-06 14:54:11 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2008-03-06 14:54:11 +0000 |
commit | 27fccc3f01f993165fa1bda5fa8f6866f8bc6b29 (patch) | |
tree | 7238452bcd0cbcca7a5489704feac7afd92deb87 | |
parent | 2008-03-05 Marcus Brinkmann <[email protected]> (diff) | |
download | gpgme-27fccc3f01f993165fa1bda5fa8f6866f8bc6b29.tar.gz gpgme-27fccc3f01f993165fa1bda5fa8f6866f8bc6b29.zip |
2008-03-06 Marcus Brinkmann <[email protected]>
* key.c (_gpgme_key_add_sig): Terminate UID in case SRC is NULL.
Reported by Marc Mutz.
Diffstat (limited to '')
-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; |