aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Schulte <[email protected]>2004-08-08 22:39:30 +0000
committerMoritz Schulte <[email protected]>2004-08-08 22:39:30 +0000
commita8dfea6457d12e92783aeb091ae5cd472cbe0c54 (patch)
tree9e4bebf79baa7b12ae1e91d144c57fc1463f8ae7
parent2004-08-07 Moritz Schulte <[email protected]> (diff)
downloadgnupg-a8dfea6457d12e92783aeb091ae5cd472cbe0c54.tar.gz
gnupg-a8dfea6457d12e92783aeb091ae5cd472cbe0c54.zip
2004-08-09 Moritz Schulte <[email protected]>
* findkey.c (modify_description): Accept description being NULL.
-rw-r--r--agent/ChangeLog4
-rw-r--r--agent/findkey.c8
2 files changed, 11 insertions, 1 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 67da75962..517d7ccdf 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-09 Moritz Schulte <[email protected]>
+
+ * findkey.c (modify_description): Accept description being NULL.
+
2004-08-07 Moritz Schulte <[email protected]>
* command-ssh.c (ssh_key_to_sexp_buffer): New argument: comment;
diff --git a/agent/findkey.c b/agent/findkey.c
index e57a5c6c5..cab3691e7 100644
--- a/agent/findkey.c
+++ b/agent/findkey.c
@@ -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++)
{