aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-12-03 14:20:01 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-12-03 14:20:01 +0000
commitd8296f893da4f7bc4f259caed2edcdaaf0479cf7 (patch)
treea9edaea233379cc8a5cc070977e6ea8bc22ab09d /src
parentf9812176b43128c68637604bc9e0d39bbf83ad52 (diff)
downloadanubis-d8296f893da4f7bc4f259caed2edcdaaf0479cf7.tar.gz
anubis-d8296f893da4f7bc4f259caed2edcdaaf0479cf7.tar.bz2
(create_key_array): Dynamically allocate current_key.
Diffstat (limited to 'src')
-rw-r--r--src/gpg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpg.c b/src/gpg.c
index ddc55bd..b7a4ad2 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -208,10 +208,10 @@ static gpgme_key_t *
create_key_array(gpgme_ctx_t ctx, struct obstack *stk)
{
gpgme_key_t tmpkey;
- char current_key[100];
+ char *current_key;
int i, j, len = strlen (gpg.encryption_keys);
- memset (current_key, 0, sizeof (current_key));
+ current_key = xmalloc (len+1);
for (i = j = 0; i <= len; i++)
{
if (gpg.encryption_keys[i] == ',' || gpg.encryption_keys[i] == '\0')
@@ -249,7 +249,7 @@ create_key_array(gpgme_ctx_t ctx, struct obstack *stk)
else
current_key[j++] = gpg.encryption_keys[i];
}
-
+ xfree (current_key);
tmpkey = NULL;
obstack_grow (stk, &tmpkey, sizeof (tmpkey));
return obstack_finish (stk);

Return to:

Send suggestions and report system problems to the System administrator.