dovecot-2.0-piegonhole commit cac6acdc4d0e:
Crash when USER is NULL. Backtrace is below. Perhaps, we should check for NULL and bail out early?
Eray
[...] (gdb) cont Continuing.
Program received signal SIGSEGV, Segmentation fault.
t_strcut (str=0x0, cutchar=64 '@') at strfuncs.c:277
277 for (p = str; *p != '\0'; p++) {
(gdb) bt full
#0 t_strcut (str=0x0, cutchar=64 '@') at strfuncs.c:277
p = <value optimized out>
#1 0x4009c28b in get_var_expand_table (service=<value optimized out>,
input=<value optimized out>) at mail-storage-service.c:478
static_tab = {{key = 117 'u', value = 0x0, long_key = 0x400f12ce
"user"}, {key = 110 'n', value = 0x0,
long_key = 0x400f0966 "username"}, {key = 100 'd', value =
0x0, long_key = 0x400f096f "domain"}, {key = 115 's',
value = 0x0, long_key = 0x400f129c "service"}, {key = 108
'l', value = 0x0, long_key = 0x400f0976 "lip"}, {
key = 114 'r', value = 0x0, long_key = 0x400f097a "rip"},
{key = 112 'p', value = 0x0, long_key = 0x400f097e "pid"}, {
key = 105 'i', value = 0x0, long_key = 0x400f8aec "uid"},
{key = 0 '\000', value = 0x0, long_key = 0x0}}
tab = 0x85f737c
#2 0x4009c364 in user_expand_varstr (service=0x8603cf4, input=<value
optimized out>, str=0x8603e88 "0")
at mail-storage-service.c:501
ret = 0x85f71f0
__FUNCTION__ = "user_expand_varstr"
#3 0x4009c8fc in mail_storage_service_next (ctx=0x8603470,
user=0x8603cf0, mail_user_r=0x8601e40) at mail-storage-service.c:835
user_set = 0x8603d90
home = <value optimized out>
chroot = <value optimized out>
error = <value optimized out>
len = <value optimized out>
temp_priv_drop = <value optimized out>
#4 0x4009dde4 in mail_storage_service_lookup_next (ctx=0x8603470,
input=0xbfb98524, user_r=0x8601e3c, mail_user_r=0x8601e40,
error_r=0xbfb9855c) at mail-storage-service.c:925
user = 0x8603cf0
ret = <value optimized out>
#5 0x08055e35 in sieve_tool_init_finish (tool=0x8601e10) at
sieve-tool.c:210
storage_service_flags = 144
service_input = {module = 0x80586c7 "mail", service = 0x8601e58
"testsuite", username = 0x0, local_ip = {family = 0, u = {
ip6 = {__in6_u = {__u6_addr8 = '\000'