]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap: imap_bodystructure_write() - Add asserts to check unexpected NULLs inside...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 25 Mar 2020 14:20:08 +0000 (16:20 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 22 Jan 2021 07:18:07 +0000 (07:18 +0000)
This just changes the assert that already triggers into a bit clearer
assert.

src/lib-imap/imap-bodystructure.c

index 705447f1c48c5a0d57433053e2f69ed82559a018..28af528822a1588f8ed4e82d3135a99a6250b872 100644 (file)
@@ -39,6 +39,9 @@ params_write(const struct message_part_param *params,
 
        seen_charset = FALSE;
        for (i = 0; i < params_count; i++) {
+               i_assert(params[i].name != NULL);
+               i_assert(params[i].value != NULL);
+
                if (i > 0)
                        str_append_c(str, ' ');
                if (default_charset &&