[Dovecot] sieve + notify + $subject$ + empty subject = segv

Stephan Bosch stephan at rename-it.nl
Mon Nov 11 02:48:26 EET 2013


On 11/11/2013 12:54 AM, Christian Ferbar wrote:
> Hello,
>
> we can reproduce a bug where lmtp crashes:

> If you use a sieve script containing the following line 
>   notify :method "mailto" :options "xyz" :message "$from$*#+$subject$";
>
> and send a mail without a Subject: header line lmtp crashes. The bug is related to the sieve module in /src/lib-sieve/plugins/notify/ext-notify-common.c:266. The line contains only a check if mail_get_headers_utf8 returns an error. So the workaround for this line would be to add a check if header[0] is not NULL.

This is an old one. Good catch. This should fix it:

http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/44f659981723

I solved it slightly differently. Also added tests.

Regards,

Stephan.


More information about the dovecot mailing list