aboutsummaryrefslogtreecommitdiffstats
path: root/mail/cyrus-imapd24
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2009-09-03 16:27:57 +0800
committerume <ume@FreeBSD.org>2009-09-03 16:27:57 +0800
commitff8dc21aad643bcb6c8c3de5535eb6c9dc313110 (patch)
tree490383513f5eb8c89eb25cf0217bb2e9e52095ae /mail/cyrus-imapd24
parent6cbfabf17fb6ad31886265cc039049e0290129ee (diff)
downloadfreebsd-ports-gnome-ff8dc21aad643bcb6c8c3de5535eb6c9dc313110.tar.gz
freebsd-ports-gnome-ff8dc21aad643bcb6c8c3de5535eb6c9dc313110.tar.zst
freebsd-ports-gnome-ff8dc21aad643bcb6c8c3de5535eb6c9dc313110.zip
Fix buffer size calculations for sieve actions_string
Submitted by: Bron Gondwana <brong__at__fastmail.fm> Obtained from: Project Cyrus
Diffstat (limited to 'mail/cyrus-imapd24')
-rw-r--r--mail/cyrus-imapd24/Makefile2
-rw-r--r--mail/cyrus-imapd24/files/patch-sieve::script.c73
2 files changed, 74 insertions, 1 deletions
diff --git a/mail/cyrus-imapd24/Makefile b/mail/cyrus-imapd24/Makefile
index 6e29005a3b8f..b7bffa68b6d7 100644
--- a/mail/cyrus-imapd24/Makefile
+++ b/mail/cyrus-imapd24/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cyrus-imapd
PORTVERSION= 2.3.14
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus/ \
http://ftp.andrew.cmu.edu/pub/cyrus/ \
diff --git a/mail/cyrus-imapd24/files/patch-sieve::script.c b/mail/cyrus-imapd24/files/patch-sieve::script.c
new file mode 100644
index 000000000000..b3c040ae7797
--- /dev/null
+++ b/mail/cyrus-imapd24/files/patch-sieve::script.c
@@ -0,0 +1,73 @@
+Index: sieve/script.c
+diff -u -p sieve/script.c.orig sieve/script.c
+--- sieve/script.c.orig 2008-03-25 05:08:46.000000000 +0900
++++ sieve/script.c 2009-09-03 10:58:13.498715559 +0900
+@@ -688,7 +688,7 @@ static int do_sieve_error(int ret,
+ ret |= keep_ret;
+ if (keep_ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+- sizeof(actions_string)-strlen(actions_string),
++ ACTIONS_STRING_LEN-strlen(actions_string),
+ "Kept\n");
+ else {
+ implicit_keep = 0; /* don't try an implicit keep again */
+@@ -742,7 +742,7 @@ static int do_action_list(sieve_interp_t
+
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+- sizeof(actions_string)-strlen(actions_string),
++ ACTIONS_STRING_LEN-strlen(actions_string),
+ "Rejected with: %s\n", a->u.rej.msg);
+
+ break;
+@@ -757,7 +757,7 @@ static int do_action_list(sieve_interp_t
+
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+- sizeof(actions_string)-strlen(actions_string),
++ ACTIONS_STRING_LEN-strlen(actions_string),
+ "Filed into: %s\n",a->u.fil.mailbox);
+ break;
+ case ACTION_KEEP:
+@@ -770,7 +770,7 @@ static int do_action_list(sieve_interp_t
+ &errmsg);
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+- sizeof(actions_string)-strlen(actions_string),
++ ACTIONS_STRING_LEN-strlen(actions_string),
+ "Kept\n");
+ break;
+ case ACTION_REDIRECT:
+@@ -783,7 +783,7 @@ static int do_action_list(sieve_interp_t
+ &errmsg);
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+- sizeof(actions_string)-strlen(actions_string),
++ ACTIONS_STRING_LEN-strlen(actions_string),
+ "Redirected to %s\n", a->u.red.addr);
+ break;
+ case ACTION_DISCARD:
+@@ -794,7 +794,7 @@ static int do_action_list(sieve_interp_t
+ &errmsg);
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+- sizeof(actions_string)-strlen(actions_string),
++ ACTIONS_STRING_LEN-strlen(actions_string),
+ "Discarded\n");
+ break;
+
+@@ -820,12 +820,12 @@ static int do_action_list(sieve_interp_t
+
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+- sizeof(actions_string)-strlen(actions_string),
++ ACTIONS_STRING_LEN-strlen(actions_string),
+ "Sent vacation reply\n");
+
+ } else if (ret == SIEVE_DONE) {
+ snprintf(actions_string+strlen(actions_string),
+- sizeof(actions_string)-strlen(actions_string),
++ ACTIONS_STRING_LEN-strlen(actions_string),
+ "Vacation reply suppressed\n");
+
+ ret = SIEVE_OK;