]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Add assert to help scan-build
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 14 Oct 2022 07:55:39 +0000 (10:55 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 18 Oct 2022 10:05:50 +0000 (10:05 +0000)
src/lib-storage/list/mailbox-list-index.c

index 53e309d335c7852e5b67f2fba8b658802722c649..c150cd45a76a3d03ec1605e105f833ab4025e53b 100644 (file)
@@ -538,6 +538,7 @@ mailbox_name_hdr_encode(struct mailbox_list *list, const char *storage_name,
                }
        }
 
+       i_assert(name_parts[0] != NULL);
        string_t *str = t_str_new(64);
        str_append(str, name_parts[0]);
        for (unsigned int i = 1; name_parts[i] != NULL; i++) {