]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Don't crash at startup if mailbox is empty.
authorTimo Sirainen <tss@iki.fi>
Wed, 11 Feb 2009 04:21:02 +0000 (23:21 -0500)
committerTimo Sirainen <tss@iki.fi>
Wed, 11 Feb 2009 04:21:02 +0000 (23:21 -0500)
--HG--
branch : HEAD

src/pop3/client.c

index 77b10c3064d8263685135924a1d7e7808eadc2e2..28b56d9b894535cedca3a788a4045dd7ce897707 100644 (file)
@@ -215,7 +215,7 @@ struct client *client_create(int fd_in, int fd_out, struct mail_user *user)
                return NULL;
        }
 
-       if (!no_flag_updates)
+       if (!no_flag_updates && client->messages_count > 0)
                client->seen_bitmask = i_malloc(MSGS_BITMASK_SIZE(client));
 
        i_assert(my_client == NULL);