]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Assert-crashfix when using a specific plugin combination.
authorTimo Sirainen <tss@iki.fi>
Thu, 6 Mar 2008 00:08:44 +0000 (02:08 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 6 Mar 2008 00:08:44 +0000 (02:08 +0200)
--HG--
branch : HEAD

src/plugins/zlib/zlib-plugin.c

index f203dbd7e455b3b7b9c81f099de62e1f46de84a7..6a4ce21d401731ba011500aacc558e0ad4dbc28d 100644 (file)
@@ -50,8 +50,7 @@ static int zlib_maildir_get_stream(struct mail *_mail,
        i_assert(input == imail->data.stream);
 
        fname = maildir_uidlist_lookup(mbox->uidlist, _mail->uid, &flags);
-       i_assert(fname != NULL);
-       p = strstr(fname, ":2,");
+       p = fname == NULL ? NULL : strstr(fname, ":2,");
        if (p != NULL && strchr(p + 3, 'Z') != NULL) {
                /* has a Z flag - it's compressed */
                fd = dup(i_stream_get_fd(imail->data.stream));