2008-03-06 Marcus Brinkmann <marcus@g10code.de>
* key.c (_gpgme_key_add_sig): Terminate UID in case SRC is NULL. Reported by Marc Mutz.
This commit is contained in:
parent
95a12bd084
commit
27fccc3f01
@ -1,3 +1,8 @@
|
|||||||
|
2008-03-06 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* key.c (_gpgme_key_add_sig): Terminate UID in case SRC is NULL.
|
||||||
|
Reported by Marc Mutz.
|
||||||
|
|
||||||
2008-03-05 Marcus Brinkmann <marcus@g10code.de>
|
2008-03-05 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* decrypt.c (release_op_data): Release OPD->result.recipients.
|
* decrypt.c (release_op_data): Release OPD->result.recipients.
|
||||||
|
@ -252,7 +252,7 @@ _gpgme_key_add_sig (gpgme_key_t key, char *src)
|
|||||||
assert (uid); /* XXX */
|
assert (uid); /* XXX */
|
||||||
|
|
||||||
/* We can malloc a buffer of the same length, because the converted
|
/* 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. */
|
size, so that we are able to store the parsed stuff there too. */
|
||||||
sig = malloc (sizeof (*sig) + 2 * src_len + 3);
|
sig = malloc (sizeof (*sig) + 2 * src_len + 3);
|
||||||
if (!sig)
|
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,
|
parse_user_id (sig->uid, &sig->name, &sig->email,
|
||||||
&sig->comment, dst);
|
&sig->comment, dst);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
sig->uid = '\0';
|
||||||
|
|
||||||
if (!uid->signatures)
|
if (!uid->signatures)
|
||||||
uid->signatures = sig;
|
uid->signatures = sig;
|
||||||
|
Loading…
Reference in New Issue
Block a user