[PATCH] IMAP NAMESPACE parse error



After the recent change to imap_next_word, I'm getting a bogus mailbox
alongside INBOX at the root of my IMAP tree. It seems that
browse_get_namespace (in libmutt/imap/browse.c) recognizes quoted
namespaces, but then leaves the string pointer pointing at the closing
quote. Imap_next_word then eats the rest of the NAMESPACE response. The
attached patch (against today's CVS tree) advances the string pointer over
the quote.
diff -Nur balsa-cvs/libmutt/imap/browse.c balsa-temp/libmutt/imap/browse.c
--- balsa-cvs/libmutt/imap/browse.c	Wed Jul 18 13:47:01 2001
+++ balsa-temp/libmutt/imap/browse.c	Wed Aug  1 10:38:55 2001
@@ -499,6 +499,10 @@
 		ns[n++] = *s;
 		s++;
 	      }
+	      /* skip trailing ", if we found one, otherwise
+	       * imap_next_word will get confused */
+	      if (*s)
+		s++;
 	    }
 	    else
 	      while (*s && !ISSPACE (*s)) 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]