]> granicus.if.org Git - neomutt/commitdiff
Sanity-check folder inferiors response. Brian Weaver reports that it fixes
authorBrendan Cully <brendan@kublai.com>
Tue, 10 Jan 2006 21:06:22 +0000 (21:06 +0000)
committerBrendan Cully <brendan@kublai.com>
Tue, 10 Jan 2006 21:06:22 +0000 (21:06 +0000)
the extra delimiters bug triggered by dbmail's incorrect LIST response.

imap/browse.c

index fc83259a95d0761a35e2e310ea76455b430dc4d5..e3aba36219c8d8acf79215438533250170f2d746 100644 (file)
@@ -120,7 +120,8 @@ int imap_browse (char* path, struct browser_state* state)
         if (rc == IMAP_CMD_CONTINUE && list.name)
         {
           if (!list.noinferiors && list.name[0] &&
-            (n = strlen (mbox)) < LONG_STRING-1)
+              !imap_mxcmp (list.name, mbox) &&
+            (n = strlen (mbox)) < sizeof (mbox) - 1)
           {
             mbox[n++] = list.delim;
             mbox[n] = '\0';