aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-crypto.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-08-28 12:01:39 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-08-28 12:01:39 +0800
commitd4f0fb515b4bad9919d918c1426f7af14ae606e2 (patch)
treefd070dd6a9208e4a93f04e770785863cb3a92cc2 /mail/mail-crypto.c
parent08b9e2eeacab3d0d2989fb03d5a2ad0979f2a1ce (diff)
downloadgsoc2013-evolution-d4f0fb515b4bad9919d918c1426f7af14ae606e2.tar
gsoc2013-evolution-d4f0fb515b4bad9919d918c1426f7af14ae606e2.tar.gz
gsoc2013-evolution-d4f0fb515b4bad9919d918c1426f7af14ae606e2.tar.bz2
gsoc2013-evolution-d4f0fb515b4bad9919d918c1426f7af14ae606e2.tar.lz
gsoc2013-evolution-d4f0fb515b4bad9919d918c1426f7af14ae606e2.tar.xz
gsoc2013-evolution-d4f0fb515b4bad9919d918c1426f7af14ae606e2.tar.zst
gsoc2013-evolution-d4f0fb515b4bad9919d918c1426f7af14ae606e2.zip
Fix to prevent possible buffer overflows and a logic fix.
2000-08-28 Jeffrey Stedfast <fejj@helixcode.com> * mail-crypto.c (mail_crypto_openpgp_encrypt): Fix to prevent possible buffer overflows and a logic fix. svn path=/trunk/; revision=5071
Diffstat (limited to 'mail/mail-crypto.c')
-rw-r--r--mail/mail-crypto.c8
1 files changed, 4 insertions, 4 deletions
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);
}