From: Timo Sirainen Date: Mon, 2 Jun 2008 19:10:11 +0000 (+0300) Subject: dict: Added assert to make sure username is never NULL. X-Git-Tag: 1.1.rc8~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=080a75584cfbe21ffd2d23c6bbb4cd8fdfd0990c;p=thirdparty%2Fdovecot%2Fcore.git dict: Added assert to make sure username is never NULL. --HG-- branch : HEAD --- diff --git a/src/lib-dict/dict.c b/src/lib-dict/dict.c index 71b3bc3e52..3efba44635 100644 --- a/src/lib-dict/dict.c +++ b/src/lib-dict/dict.c @@ -57,6 +57,8 @@ struct dict *dict_init(const char *uri, enum dict_data_type value_type, struct dict *dict; const char *p, *name; + i_assert(username != NULL); + p = strchr(uri, ':'); if (p == NULL) { i_error("Dictionary URI is missing ':': %s", uri);