[dovecot-cvs] dovecot/src/master auth-process.c,1.78,1.79

cras at dovecot.org cras at dovecot.org
Sun Mar 13 00:48:36 EET 2005


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

Modified Files:
	auth-process.c 
Log Message:
Don't give NULL parameters to printf's %s format. Fixes crash with Solaris
and some others.



Index: auth-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/auth-process.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- auth-process.c	7 Mar 2005 18:55:15 -0000	1.78
+++ auth-process.c	12 Mar 2005 22:48:33 -0000	1.79
@@ -422,11 +422,17 @@
 
 	for (ap = set->passdbs, i = 1; ap != NULL; ap = ap->next, i++) {
 		env_put(t_strdup_printf("PASSDB_%u_DRIVER=%s", i, ap->driver));
-		env_put(t_strdup_printf("PASSDB_%u_ARGS=%s", i, ap->args));
+		if (ap->args != NULL) {
+			env_put(t_strdup_printf("PASSDB_%u_ARGS=%s",
+						i, ap->args));
+		}
 	}
 	for (au = set->userdbs, i = 1; au != NULL; au = au->next, i++) {
 		env_put(t_strdup_printf("USERDB_%u_DRIVER=%s", i, au->driver));
-		env_put(t_strdup_printf("USERDB_%u_ARGS=%s", i, au->args));
+		if (au->args != NULL) {
+			env_put(t_strdup_printf("USERDB_%u_ARGS=%s",
+						i, au->args));
+		}
 	}
 
 	for (as = set->sockets, i = 1; as != NULL; as = as->next, i++) {



More information about the dovecot-cvs mailing list