isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 6dfccb76a58a189ead89cab654cac2a0c3fdd494
parent a0dc37339e081f139474c67ed521db5cc417e012
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sat, 27 Jul 2013 15:35:42 +0200

be somewhat stricter about the LIST response syntax

the first token *must* be a list.

Diffstat:
Msrc/drv_imap.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c @@ -887,16 +887,16 @@ parse_list_rsp( imap_store_t *ctx, list_t *list, char *cmd ) char *arg; list_t *lp; - if (!list) { + if (!is_list( list )) { error( "IMAP error: malformed LIST response\n" ); + free_list( list ); return LIST_BAD; } - if (list->val == LIST) - for (lp = list->child; lp; lp = lp->next) - if (is_atom( lp ) && !strcasecmp( lp->val, "\\NoSelect" )) { - free_list( list ); - return LIST_OK; - } + for (lp = list->child; lp; lp = lp->next) + if (is_atom( lp ) && !strcasecmp( lp->val, "\\NoSelect" )) { + free_list( list ); + return LIST_OK; + } free_list( list ); arg = next_arg( &cmd ); if (!ctx->delimiter)