]> granicus.if.org Git - mutt/commitdiff
Don't pass a null destination to imap_fix_path in the default
authorBrendan Cully <brendan@kublai.com>
Mon, 3 Apr 2006 20:26:14 +0000 (20:26 +0000)
committerBrendan Cully <brendan@kublai.com>
Mon, 3 Apr 2006 20:26:14 +0000 (20:26 +0000)
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.

imap/command.c

index 093cab07be5889eedf19f2c3d753af6a895be7d2..a6cf82f7009a64b9edb6c7954be9ef004c283127 100644 (file)
@@ -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))
       {