dovecot-2.2-pigeonhole: lib-sieve: Fixed segfault occurring when...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Sun Jan 3 17:20:57 UTC 2016
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/ebc034a52f6f
changeset: 2196:ebc034a52f6f
user: Stephan Bosch <stephan at rename-it.nl>
date: Sun Jan 03 18:20:51 2016 +0100
description:
lib-sieve: Fixed segfault occurring when default match type of a test is not :is.
Would not occur in Pigeonhole itself.
diffstat:
src/lib-sieve/sieve-match-types.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r 1d2a29f9799b -r ebc034a52f6f src/lib-sieve/sieve-match-types.c
--- a/src/lib-sieve/sieve-match-types.c Sun Jan 03 16:33:39 2016 +0100
+++ b/src/lib-sieve/sieve-match-types.c Sun Jan 03 18:20:51 2016 +0100
@@ -481,14 +481,16 @@
/* Verify the default match type if none is specified explicitly */
if ( mt_arg == NULL || mt_arg->argument == NULL ||
- mt_arg->argument->data == NULL ) {
- mtctx = NULL;
+ mt_arg->argument->data == NULL ) {
mcht = sieve_match_type_copy(sieve_command_pool(cmd), mcht_default);
+ mtctx = t_new(struct sieve_match_type_context, 1);
+ mtctx->command = cmd;
+ mtctx->match_type = mcht;
} else {
mtctx = (struct sieve_match_type_context *) mt_arg->argument->data;
mcht = mtctx->match_type;
- mtctx->comparator = cmp;
}
+ mtctx->comparator = cmp;
/* Check whether this match type requires additional validation.
* Additional validation can override the match type recorded in the context
More information about the dovecot-cvs
mailing list