From: Timo Sirainen Date: Wed, 23 Jun 2004 17:47:06 +0000 (+0300) Subject: Default to "" args instead of NULL to avoid some crashes X-Git-Tag: 1.1.alpha1~3872 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91e4199476cb2add8143c18583fa57e1decfea88;p=thirdparty%2Fdovecot%2Fcore.git Default to "" args instead of NULL to avoid some crashes --HG-- branch : HEAD --- diff --git a/src/auth/passdb.c b/src/auth/passdb.c index f62689d720..af95276cae 100644 --- a/src/auth/passdb.c +++ b/src/auth/passdb.c @@ -104,7 +104,8 @@ void passdb_init(void) 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 diff --git a/src/auth/userdb.c b/src/auth/userdb.c index 9395b1e6e9..0dc3b87003 100644 --- a/src/auth/userdb.c +++ b/src/auth/userdb.c @@ -25,7 +25,8 @@ void userdb_init(void) 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