From d4f0fb515b4bad9919d918c1426f7af14ae606e2 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 28 Aug 2000 04:01:39 +0000 Subject: Fix to prevent possible buffer overflows and a logic fix. 2000-08-28 Jeffrey Stedfast * mail-crypto.c (mail_crypto_openpgp_encrypt): Fix to prevent possible buffer overflows and a logic fix. svn path=/trunk/; revision=5071 --- mail/mail-crypto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mail/mail-crypto.c') 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); } -- cgit