Hi, developers.

There is a bug in the drv_imap.c, function parse_imap_list. When processing
LIST response there is missing string termination and as result sometimes
garbage at the end of the folder name.

Quick and dirty patch:

--- drv_imap.c.orig     2014-04-12 16:01:38.000000000 +0300
+++ drv_imap.c  2014-06-27 13:11:04.234313924 +0300
@@ -687,7 +687,8 @@
                        if (*s != '}' || *++s)
                                goto bail;

-                       s = cur->val = nfmalloc( cur->len );
+                       s = cur->val = nfmalloc( cur->len + 1 );
+                       cur->val[cur->len] = 0;

                  getbytes:
                        bytes -= socket_read( &ctx->conn, s, bytes );

Or maybe better to replace nfmalloc with nfcalloc?

--
Armands
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to