From: Brendan Cully Date: Mon, 3 Apr 2006 20:26:14 +0000 (+0000) Subject: Don't pass a null destination to imap_fix_path in the default X-Git-Tag: mutt-1-5-12-rel~113 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c72c342e1e0f02a2e62a52c1c5984ce86b5b485;p=mutt Don't pass a null destination to imap_fix_path in the default STATUS handler when the mailbox name is implicitly INBOX. Thanks to Kai Hendry for the test mailbox and Sami Liedes for the backtrace. Closes debian #351337. --- diff --git a/imap/command.c b/imap/command.c index 093cab07..a6cf82f7 100644 --- a/imap/command.c +++ b/imap/command.c @@ -834,9 +834,14 @@ static void cmd_parse_status (IMAP_DATA* idata, char* s) if (mutt_account_match (&idata->conn->account, &mx.account)) { - value = safe_strdup (mx.mbox); - imap_fix_path (idata, mx.mbox, value, mutt_strlen (value) + 1); - FREE (&mx.mbox); + if (mx.mbox) + { + value = safe_strdup (mx.mbox); + imap_fix_path (idata, mx.mbox, value, mutt_strlen (value) + 1); + FREE (&mx.mbox); + } + else + value = safe_strdup ("INBOX"); if (value && !imap_mxcmp (mailbox, value)) {