Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3896:7aea43511bac HEAD
Don't crash if username is NULL (shouldn't happen though)
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 15 Jan 2006 21:01:46 +0200 |
parents | 5c047d58a67d |
children | 9dc2f8f0eb59 |
files | src/master/mail-process.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;