summaryrefslogtreecommitdiff
path: root/libsieve
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-10-24 06:09:31 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-10-24 06:09:31 +0000
commitc57e7377fade2ad430478014ddfec815ec94004b (patch)
treecaf54e253ad41f15899021d140538e82be252e87 /libsieve
parent887d5d3f4426883a200e530a890588b29ce4a2e5 (diff)
downloadmailutils-c57e7377fade2ad430478014ddfec815ec94004b.tar.gz
mailutils-c57e7377fade2ad430478014ddfec815ec94004b.tar.bz2
Bugfix
* libsieve/prog.c (mu_sv_code_command): Ensure tag arguments have the proper type.
Diffstat (limited to 'libsieve')
-rw-r--r--libsieve/prog.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libsieve/prog.c b/libsieve/prog.c
index a9f67290d..d5e31acde 100644
--- a/libsieve/prog.c
+++ b/libsieve/prog.c
@@ -203,6 +203,20 @@ mu_sv_code_command (mu_sieve_register_t *reg, mu_list_t arglist)
break;
}
mu_iterator_current (itr, (void **)&tagrec.arg);
+ if (tagrec.arg->type != tag->argtype)
+ {
+ mu_sv_compile_error (&mu_sieve_locus,
+ _("type mismatch in argument to "
+ "tag `%s'"),
+ tag->name);
+ mu_sv_compile_error (&mu_sieve_locus,
+ _("expected %s but passed %s"),
+ mu_sieve_type_str (tag->argtype),
+ mu_sieve_type_str
+ (tagrec.arg->type));
+ err = 1;
+ break;
+ }
}
else
tagrec.arg = NULL;

Return to:

Send suggestions and report system problems to the System administrator.