On 19.06.2010 23:29, wrote Matthias Rieber:
> Hi,
> 
> I get a core dump with 2.0.beta6 (573cb66e9180) when I access virtual
> folders with the master user. Since ACLs are active I have to set a global
> ACL in .DEFAULTS to access all folders.
> 
> Coredump:
> 
> Core was generated by `dovecot/imap'.
> Program terminated with signal 11, Segmentation fault.
> [New process 15910]
> #0  0x00002afabdfbd6a2 in virtual_config_free (mbox=0x10a34128) at
> ../../../src/lib/array.h:198
> 198             *count_r = array->buffer->used / array->element_size;

I'm seeing the same crash:

http://www.dovecot.org/list/dovecot/2010-June/049735.html

The attached patch fixed it for me. It's not yet fixed in hg however.

Regards,
e-frog





--- dovecot-2.0.beta6.orig/src/plugins/virtual/virtual-config.c
+++ dovecot-2.0.beta6/src/plugins/virtual/virtual-config.c
@@ -400,10 +400,12 @@ void virtual_config_free(struct virtual_
        struct virtual_backend_box *const *bboxes;
        unsigned int i, count;

-       bboxes = array_get_modifiable(&mbox->backend_boxes, &count);
-       for (i = 0; i < count; i++) {
-               if (bboxes[i]->search_args != NULL)
-                       mail_search_args_unref(&bboxes[i]->search_args);
+       if (array_is_created(&mbox->backend_boxes)) {
+               bboxes = array_get_modifiable(&mbox->backend_boxes, &count);
+               for (i = 0; i < count; i++) {
+                       if (bboxes[i]->search_args != NULL)
+                               mail_search_args_unref(&bboxes[i]->search_args);
+               }
+               array_free(&mbox->backend_boxes);
        }
-       array_free(&mbox->backend_boxes);
 }

Reply via email to