diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-10-24 06:09:31 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-10-24 06:09:31 +0000 |
commit | c57e7377fade2ad430478014ddfec815ec94004b (patch) | |
tree | caf54e253ad41f15899021d140538e82be252e87 /libsieve | |
parent | 887d5d3f4426883a200e530a890588b29ce4a2e5 (diff) | |
download | mailutils-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.c | 14 |
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; |