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) ...@@ -194,6 +194,14 @@ sieve_code_command (mu_sieve_register_t *reg, mu_list_t arglist)
194 if (tag->argtype != SVT_VOID) 194 if (tag->argtype != SVT_VOID)
195 { 195 {
196 mu_iterator_next (itr); 196 mu_iterator_next (itr);
197 if (mu_iterator_is_done (itr))
198 {
199 sieve_compile_error (sieve_filename, sieve_line_num,
200 _("required argument for tag %s is missing"),
201 tag->name);
202 err = 1;
203 break;
204 }
197 mu_iterator_current (itr, (void **)&tagrec.arg); 205 mu_iterator_current (itr, (void **)&tagrec.arg);
198 } 206 }
199 else 207 else
......