]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict: Added assert to make sure username is never NULL.
authorTimo Sirainen <tss@iki.fi>
Mon, 2 Jun 2008 19:10:11 +0000 (22:10 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 2 Jun 2008 19:10:11 +0000 (22:10 +0300)
--HG--
branch : HEAD

src/lib-dict/dict.c

index 71b3bc3e520e03a34a0edbb7a689e55fa30645f1..3efba446358fd8ed1cf6e7953bc8bb87bf3e70cb 100644 (file)
@@ -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);