1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-03 12:11:33 +01:00

2004-08-09 Moritz Schulte <moritz@g10code.com>

* findkey.c (modify_description): Accept description being NULL.
This commit is contained in:
Moritz Schulte 2004-08-08 22:39:30 +00:00
parent 12c0c36151
commit a8dfea6457
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-08-09 Moritz Schulte <moritz@g10code.com>
* findkey.c (modify_description): Accept description being NULL.
2004-08-07 Moritz Schulte <moritz@g10code.com>
* command-ssh.c (ssh_key_to_sexp_buffer): New argument: comment;

View File

@ -143,13 +143,19 @@ modify_description (const char *description,
const char *comment, size_t comment_length,
char **description_modified)
{
size_t description_length = strlen (description);
size_t description_length = description ? strlen (description) : 0;
size_t description_new_length = description_length;
gpg_error_t err = GPG_ERR_NO_ERROR;
char *description_new = NULL;
unsigned int i = 0, j = 0;
unsigned int special = 0;
if (! description)
{
*description_modified = NULL;
return err;
}
/* Calculate length. */
for (i = 0; i < description_length; i++)
{