aboutsummaryrefslogtreecommitdiffstats
path: root/mail
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
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')
-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);
}