]> granicus.if.org Git - mutt/commitdiff
Sanity-check mailbox name in imap_subscribe. (Closes: #2746)
authorBrendan Cully <brendan@kublai.com>
Wed, 7 Feb 2007 17:08:51 +0000 (17:08 +0000)
committerBrendan Cully <brendan@kublai.com>
Wed, 7 Feb 2007 17:08:51 +0000 (17:08 +0000)
imap/imap.c

index 03ca2114983b88b798fe19c2f1eb38729f213350..5a77f2f911a21a0222be0917b4cbe7e331393fa3 100644 (file)
@@ -1732,7 +1732,7 @@ int imap_subscribe (char *path, int subscribe)
   BUFFER err, token;
   IMAP_MBOX mx;
 
-  if (!mx_is_imap (path) || imap_parse_path (path, &mx))
+  if (!mx_is_imap (path) || imap_parse_path (path, &mx) || !mx.mbox)
   {
     mutt_error (_("Bad mailbox name"));
     return -1;