From a2160633eb02760b11e38dad71debb898546c54f Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Tue, 10 Jan 2006 21:06:22 +0000 Subject: [PATCH] Sanity-check folder inferiors response. Brian Weaver reports that it fixes the extra delimiters bug triggered by dbmail's incorrect LIST response. --- imap/browse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imap/browse.c b/imap/browse.c index fc83259a9..e3aba3621 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -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'; -- 2.40.0