dovecot-1.1: Don't crash if trying to deliver mail to mailbox ou...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Feb 20 20:37:51 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/c6afa177bbf1
changeset: 7270:c6afa177bbf1
user: Timo Sirainen <tss at iki.fi>
date: Wed Feb 20 20:39:07 2008 +0200
description:
Don't crash if trying to deliver mail to mailbox outside all namespaces.
diffstat:
1 file changed, 6 insertions(+)
src/deliver/deliver.c | 6 ++++++
diffs (16 lines):
diff -r af415b88ba1d -r c6afa177bbf1 src/deliver/deliver.c
--- a/src/deliver/deliver.c Wed Feb 20 20:02:37 2008 +0200
+++ b/src/deliver/deliver.c Wed Feb 20 20:39:07 2008 +0200
@@ -199,6 +199,12 @@ int deliver_save(struct mail_namespace *
mailbox_name = str_sanitize(mailbox, 80);
box = mailbox_open_or_create_synced(namespaces, storage_r, mailbox);
if (box == NULL) {
+ if (*storage_r == NULL) {
+ deliver_log(mail,
+ "save failed to %s: Unknown namespace",
+ mailbox_name);
+ return -1;
+ }
deliver_log(mail, "save failed to %s: %s", mailbox_name,
mail_storage_get_last_error(*storage_r, &error));
return -1;
More information about the dovecot-cvs
mailing list