On 08/09/2010 06:01 PM, Timo Sirainen wrote:
On Sat, 2010-08-07 at 19:29 +0200, Samuel Kvasnica wrote:
} else if (*str == ns->list->hierarchy_sep ||
*str == mlist->escape_char || *str == '/')
} else {
if (*str == ns->list->hierarchy_sep || ( mlist && // SK mlist was zero check added !
*str == mlist->escape_char) || *str == '/'){ str_printfa(esc, "%c%02x", mlist->escape_char, *str);
else
}
else{ str_append_c(esc, *str);
}
Was there a reason for this change? and here is the backtrace (it crashes again using your official path with no mlist check):}
Core was generated by `dovecot/imap'.
Program terminated with signal 11, Segmentation
fault.
#0 list_escape (ns=0x6488b0, str=0x659eff "%", vname=true) at
listescape-plugin.c:75
75 *str == mlist->escape_char || *str ==
'/')
(gdb) bt
full
#0 list_escape (ns=0x6488b0, str=0x659eff "%", vname=true) at
listescape-plugin.c:75
mlist =
0x0
esc =
0x621470
i =
0
#1 0x00007fa3d07d5ef8 in iter_escape_patterns (flags=<value optimized out>, patterns=<value optimized out>, list=<value optimized out>) at listescape-plugin.c:151 orig_ns = 0x6214af
i =
1
#2 listescape_mailbox_list_iter_init (flags=<value optimized out>,
patterns=<value optimized out>, list=<value optimized out>) at
listescape-plugin.c:169
mlist =
0x64f590
ctx = <value optimized
out>
#3 0x00007fa3d1001f8b in acl_mailbox_list_iter_init (list=0x64f1c8,
patterns=0x6213c8, flags=4866) at
acl-mailbox-list.c:194
ctx =
0x688ca0
i = <value optimized
out>
inboxcase = <value optimized
out>
#4 0x000000000040c746 in list_namespace_init (ctx=<value optimized out>) at cmd-list.c:773
pat =
0x6213c8
ns =
0x645d10
cur_ref = 0x659ef0
""
pattern = 0x659ef8
"Shared/%"
inbox_match = <value optimized
out>
#5 cmd_list_continue (ctx=<value optimized out>) at cmd-list.c:810
_data_stack_cur_id =
4
ctx =
0x6576a8
#6 0x000000000040cd02 in cmd_list_full (cmd=0x6575a8, lsub=true) at cmd-list.c:992
client =
0x656e48
args =
0x659e40
list_args =
0x7fa3d1bdca18
arg_count = <value optimized
out>
ctx =
0x6576a8
patterns = {arr = {buffer = 0x6576f8, element_size = 8}, v =
0x6576f8, v_modifiable =
0x6576f8}
pattern = 0x659ef8
"Shared/%"
patterns_strarr =
0x657730
#7 0x00000000004103ad in client_command_input (cmd=0x6575a8) at imap-client.c:660
client = 0x656e48
command = <value optimized out>
__FUNCTION__ = "client_command_input"
#8 0x000000000041048d in client_command_input (cmd=0x6575a8) at imap-client.c:710 client = 0x656e48 command = 0x651898 __FUNCTION__ = "client_command_input" #9 0x00000000004106b5 in client_handle_next_command (remove_io_r=<value optimized out>, client=<value optimized out>) at imap-client.c:751 size = 25 #10 client_handle_input (remove_io_r=<value optimized out>, client=<value optimized out>) at imap-client.c:763 _data_stack_cur_id = 3 ---Type <return> to continue, or q <return> to quit--- ret = false remove_io = <value optimized out> handled_commands = false __FUNCTION__ = "client_handle_input" #11 0x0000000000410fdf in client_input (client=0x656e48) at imap-client.c:802 cmd = <value optimized out> output = 0x657428 bytes = <value optimized out> __FUNCTION__ = "client_input" #12 0x00007fa3d1bce5f5 in io_loop_handler_run (ioloop=<value optimized out>) at ioloop-epoll.c:212 ctx = 0x6297d0 event = 0x629840 list = 0x657500 io = 0x6574c0 tv = {tv_sec = 4, tv_usec = 481822} t_id = 2 msecs = <value optimized out> ret = 1 i = 0 call = <value optimized out> #13 0x00007fa3d1bcd778 in io_loop_run (ioloop=0x6295c0) at ioloop.c:350 No locals. #14 0x00007fa3d1bbd3c3 in master_service_run (service=0x629490, callback=0x659eff) at master-service.c:496 No locals. #15 0x0000000000418f71 in main (argc=1, argv=0x629370) at main.c:358 set_roots = {0x41c480, 0x0} service_flags = <value optimized out> storage_service_flags = MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT postlogin_socket_path = 0x0 username = 0x0 c = <value optimized out>