# HG changeset patch # User Timo Sirainen # Date 1137351706 -7200 # Node ID 7aea43511bac53a8bc11416ca1e51b5344c4310c # Parent 5c047d58a67d9597d104dc763221c8ec7b2061cb Don't crash if username is NULL (shouldn't happen though) diff -r 5c047d58a67d -r 7aea43511bac src/master/mail-process.c --- a/src/master/mail-process.c Sun Jan 15 17:59:15 2006 +0200 +++ b/src/master/mail-process.c Sun Jan 15 21:01:46 2006 +0200 @@ -103,8 +103,8 @@ memcpy(tab, static_tab, sizeof(static_tab)); tab[0].value = user; - tab[1].value = t_strcut(user, '@'); - tab[2].value = strchr(user, '@'); + tab[1].value = user == NULL ? NULL : t_strcut(user, '@'); + tab[2].value = user == NULL ? NULL : strchr(user, '@'); if (tab[2].value != NULL) tab[2].value++; tab[3].value = t_str_ucase(protocol); tab[4].value = home;