[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mailutils] Sieve bugs [mailutils 1.0]
From: |
Kostas Zorbadelos |
Subject: |
Re: [bug-mailutils] Sieve bugs [mailutils 1.0] |
Date: |
Wed, 4 Oct 2006 14:17:09 +0300 |
User-agent: |
Mutt/1.5.11 |
On Tue, Oct 03, 2006 at 07:41:36PM +0300, Sergey Poznyakoff wrote:
> Kostas Zorbadelos <address@hidden> wrote:
>
Hello Sergey and sorry for the delay in my answer. As always your
reaction time to bug solving is excellent!
> > The attached patch solves the issue.
>
> Shouldn't it rather be:
>
> Index: libsieve/extensions/vacation.c
> ===================================================================
> RCS file: /cvsroot/mailutils/mailutils/libsieve/extensions/vacation.c,v
> retrieving revision 1.14
> diff -p -u -r1.14 vacation.c
> --- libsieve/extensions/vacation.c 27 Jun 2006 13:07:56 -0000 1.14
> +++ libsieve/extensions/vacation.c 3 Oct 2006 16:37:50 -0000
> @@ -448,7 +448,9 @@ vacation_subject (mu_sieve_machine_t mac
>
> free (value);
> }
> -
> + else
> + subject = "Re:";
> +
> if (mu_rfc2047_encode (MU_SIEVE_CHARSET, "quoted-printable",
> subject, &value))
> mu_header_set_value (newhdr, MU_HEADER_SUBJECT, subject, 0);
>
>
> ??
>
Your patch is much simpler. However, I like the "Re: Your mail" as
subject. This is the behaviour of mutt also, which is my favourite mail
client, when responding to messages with no subject. I also consider a
good idea the initialization of the subject_allocated variable. So my
proposal becomes:
@@ -400,7 +400,7 @@
mu_sieve_value_t *arg;
char *value;
char *subject;
- int subject_allocated;
+ int subject_allocated = 0;
mu_header_t hdr;
if (mu_sieve_tag_lookup (tags, "subject", &arg))
@@ -448,6 +448,8 @@
free (value);
}
+ else
+ subject = "Re: Your mail";
if (mu_rfc2047_encode (MU_SIEVE_CHARSET, "quoted-printable",
subject, &value))
Let me know what you decide to include in the cvs tree.
> > The second bug is in the sieve parser.
>
> Here's the patch:
>
> Index: libsieve/prog.c
> ===================================================================
> RCS file: /cvsroot/mailutils/mailutils/libsieve/prog.c,v
> retrieving revision 1.16
> diff -p -u -r1.16 prog.c
> --- libsieve/prog.c 27 Jun 2006 13:07:56 -0000 1.16
> +++ libsieve/prog.c 3 Oct 2006 16:37:48 -0000
> @@ -194,6 +194,14 @@ sieve_code_command (mu_sieve_register_t
> 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
>
> Thanks for reporting.
>
Thanks for giving the patch :). It works fine.
> Regards,
> Sergey
>
Thanks,
Kostas