Commit 857fabe9 857fabe93d20ae33dac48aae3b22ad608d016d38 by Sergey Poznyakoff

(sieve_code_command): Avoid dead loop if a tag

is not given the argument it requires. Improve the diagnostics.
Bug reported by Kostas Zorbadelos.
1 parent a0d4116c
......@@ -194,6 +194,14 @@ sieve_code_command (mu_sieve_register_t *reg, mu_list_t arglist)
if (tag->argtype != SVT_VOID)
{
mu_iterator_next (itr);
if (mu_iterator_is_done (itr))
{
sieve_compile_error (sieve_filename, sieve_line_num,
_("required argument for tag %s is missing"),
tag->name);
err = 1;
break;
}
mu_iterator_current (itr, (void **)&tagrec.arg);
}
else
......