summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/dovecot/files/dovecot-2.1.8_managesieve_gold.patch')
-rw-r--r--net-mail/dovecot/files/dovecot-2.1.8_managesieve_gold.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/net-mail/dovecot/files/dovecot-2.1.8_managesieve_gold.patch b/net-mail/dovecot/files/dovecot-2.1.8_managesieve_gold.patch
new file mode 100644
index 000000000000..97d12b5a6a50
--- /dev/null
+++ b/net-mail/dovecot/files/dovecot-2.1.8_managesieve_gold.patch
@@ -0,0 +1,39 @@
+
+# HG changeset patch
+# User Stephan Bosch <stephan@rename-it.nl>
+# Date 1342130270 -7200
+# Node ID 6ceeb642123117ed8377f3b0d7d28171f790e911
+# Parent 602d93069d3a1c93866178308bd4d03f20a15f73
+ManageSieve: fixed segfault bug triggered by CHECKSCRIPT command.
+
+diff -r 602d93069d3a -r 6ceeb6421231 src/lib-sievestorage/sieve-storage-save.c
+--- a/src/lib-sievestorage/sieve-storage-save.c Sat May 26 00:16:35 2012 +0200
++++ b/src/lib-sievestorage/sieve-storage-save.c Thu Jul 12 23:57:50 2012 +0200
+@@ -318,19 +318,20 @@
+ bool sieve_storage_save_will_activate
+ (struct sieve_save_context *ctx)
+ {
+- const char *scriptname;
+- int ret = 0;
++ bool result = FALSE;
+
+- T_BEGIN {
++ if ( ctx->scriptname != NULL ) T_BEGIN {
++ const char *scriptname;
++ int ret;
++
+ ret = sieve_storage_get_active_scriptfile(ctx->storage, &scriptname);
+-
+ if ( ret > 0 ) {
+ /* Is the requested script active? */
+- ret = ( strcmp(ctx->scriptname, scriptname) == 0 ? 1 : 0 );
++ result = ( strcmp(ctx->scriptname, scriptname) == 0 );
+ }
+ } T_END;
+
+- return ret;
++ return result;
+ }
+
+ int sieve_storage_save_commit(struct sieve_save_context **ctx)
+