From: Timo Sirainen Date: Fri, 15 Oct 2010 23:30:50 +0000 (+0100) Subject: lib-storage: mailbox_get_guid() crashed if storage didn't support GUIDs. X-Git-Tag: 2.0.6~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=751cb41a81133fc6085ef79321a9d2d270d9e29d;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: mailbox_get_guid() crashed if storage didn't support GUIDs. --- diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index 957e68c2cd..7e5afa510e 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -892,6 +892,7 @@ int mailbox_get_guid(struct mailbox *box, uint8_t guid[MAIL_GUID_128_SIZE]) if (box->v.get_guid == NULL) { mail_storage_set_error(box->storage, MAIL_ERROR_NOTPOSSIBLE, "Storage doesn't support mailbox GUIDs"); + return -1; } if (!box->opened) { if (mailbox_open(box) < 0)