aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog2
-rw-r--r--mail/mail-crypto.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a92c7bf3d2..580495a31a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,7 +1,7 @@
2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
* mail-crypto.c (mail_crypto_openpgp_encrypt): Fix to prevent
- possible buffer overflows
+ possible buffer overflows and a logic fix.
2000-08-27 Jeffrey Stedfast <fejj@helixcode.com>
diff --git a/mail/mail-crypto.c b/mail/mail-crypto.c
index 5ec218e334..47279e29b3 100644
--- a/mail/mail-crypto.c
+++ b/mail/mail-crypto.c
@@ -429,7 +429,7 @@ mail_crypto_openpgp_encrypt (const char *plaintext,
{
GPtrArray *recipient_list = NULL;
GPtrArray *argv;
- int retval, i, r;
+ int retval, r;
char *path;
char *passphrase = NULL, *ciphertext = NULL, *diagnostics = NULL;
int passwd_fds[2];
@@ -462,7 +462,7 @@ mail_crypto_openpgp_encrypt (const char *plaintext,
for (r = 0; r < recipients->len; r++) {
char *buf, *recipient;
- recipient = recipients->pdata[i];
+ recipient = recipients->pdata[r];
buf = g_strdup_printf ("-r %s", recipient);
g_ptr_array_add (recipient_list, buf);
}
@@ -496,7 +496,7 @@ mail_crypto_openpgp_encrypt (const char *plaintext,
for (r = 0; r < recipients->len; r++) {
char *buf, *recipient;
- recipient = recipients->pdata[i];
+ recipient = recipients->pdata[r];
buf = g_strdup_printf ("-r %s", recipient);
g_ptr_array_add (recipient_list, buf);
}
@@ -525,7 +525,7 @@ mail_crypto_openpgp_encrypt (const char *plaintext,
for (r = 0; r < recipients->len; r++) {
char *buf, *recipient;
- recipient = recipients->pdata[i];
+ recipient = recipients->pdata[r];
buf = g_strdup_printf ("-r %s", recipient);
g_ptr_array_add (recipient_list, buf);
}