[Dovecot] Dovecot-sieve vacation proposal, use address in addresses as recipient

Timo Sirainen tss at iki.fi
Mon Apr 19 17:59:47 EEST 2010


On Fri, 2010-04-09 at 03:05 +0200, David Berard wrote:

> I propose to use the addresses found in addresses (if one match)
> as From address in vacation reply.
> 
> I've made a little patch who do that [1]. 

Stephan will probably do something about this, but until then: Your
patch uses memory in a way that could cause a buffer overflow and break
things. This really isn't safe to do:

> + sprintf(recipient, "%s", my_address);

I'm not sure if there's an easy way to fix it. Don't go writing to const
pointers anyway. :) Probably should be something like:

_contains_my_address(.., const char **recipient_r)
{
  ..
  *recipient_r = my_address; // instead of sprintf
  ..
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100419/7b35b899/attachment.bin 


More information about the dovecot mailing list