commit 9a0bed711c9dfdba3d878cef6f69b73ca8cd859f
Author: Oswald Buddenhagen <[email protected]>
Date:   Sat Jul 27 15:35:42 2013 +0200

    be somewhat stricter about the LIST response syntax
    
    the first token *must* be a list.

 src/drv_imap.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index 07fcbe9..6951c0c 100644
--- 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)

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to