[dovecot-cvs] dovecot/src/auth userdb.c, 1.9, 1.10 passdb.c, 1.17, 1.18

cras at procontrol.fi cras at procontrol.fi
Wed Jun 23 20:47:08 EEST 2004


Update of /home/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv4918

Modified Files:
	userdb.c passdb.c 
Log Message:
Default to "" args instead of NULL to avoid some crashes



Index: userdb.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/userdb.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- userdb.c	23 Jun 2004 15:02:50 -0000	1.9
+++ userdb.c	23 Jun 2004 17:47:06 -0000	1.10
@@ -25,7 +25,8 @@
 	args = strchr(name, ' ');
 	name = t_strcut(name, ' ');
 
-	while (args != NULL && (*args == ' ' || *args == '\t'))
+	if (args == NULL) args = "";
+	while (*args == ' ' || *args == '\t')
 		args++;
 
 #ifdef USERDB_PASSWD

Index: passdb.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/passdb.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- passdb.c	23 Jun 2004 15:02:50 -0000	1.17
+++ passdb.c	23 Jun 2004 17:47:06 -0000	1.18
@@ -104,7 +104,8 @@
 	args = strchr(name, ' ');
 	name = t_strcut(name, ' ');
 
-	while (args != NULL && (*args == ' ' || *args == '\t'))
+	if (args == NULL) args = "";
+	while (*args == ' ' || *args == '\t')
 		args++;
 
 #ifdef PASSDB_PASSWD



More information about the dovecot-cvs mailing list