[Dovecot] Deleting metadata smashes file dovecot.dict

Timo Sirainen tss at iki.fi
Tue Aug 28 18:54:03 EEST 2012


On 28.8.2012, at 17.42, Ewald Dieterich wrote:

> On 08/08/12 14:23, Andre Gröbe wrote:
>> I am using dovecot (see dovecot -n output below) with metadata plugin in
>> my own plugin. I want to insert and delete some large metadata (>4KiB).
>> It seems, that the delete in a second call of my plugin smashes the file
>> dovecot.dict in users dir:
> 
> That's an error in dict-file.c, file_dict_refresh():
> 
>  while ((key = i_stream_read_next_line(input)) != NULL &&
>         (value = i_stream_read_next_line(input)) != NULL) {
> 
> If reading the value requires reading from the stream (because the value doesn't fit into the input buffer), the key is overwritten. The attached patch duplicates the key before reading the value.

Committed: http://hg.dovecot.org/dovecot-2.1/rev/6e53209030f6




More information about the dovecot mailing list