[dovecot-cvs] dovecot/src/master mail-process.c,1.79,1.80

cras at dovecot.org cras at dovecot.org
Sun Jan 15 21:01:48 EET 2006


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv12045

Modified Files:
	mail-process.c 
Log Message:
Don't crash if username is NULL (shouldn't happen though)



Index: mail-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- mail-process.c	13 Jan 2006 20:26:40 -0000	1.79
+++ mail-process.c	15 Jan 2006 19:01:46 -0000	1.80
@@ -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;



More information about the dovecot-cvs mailing list