commit 8513358e0a3f3d720b394251a018e46ed87ef262 Author: Oswald Buddenhagen <o...@users.sf.net> Date: Sat Jun 28 11:04:41 2014 +0200
zero-terminate imap literals now that we properly support literals for strings, we must expect that the consumer code will use them as strings. amends fc77feacc. discovered by Armands Liepins <arman...@gmail.com> REFMAIL: CAF_KswXoxdm7KXnWW4b_1odf=xse4qrqrn4asecwcpf1d+d...@mail.gmail.com src/drv_imap.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/drv_imap.c b/src/drv_imap.c index adacc43..b1f9de6 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -687,7 +687,8 @@ parse_imap_list( imap_store_t *ctx, char **sp, parse_list_state_t *sts ) if (*s != '}' || *++s) goto bail; - s = cur->val = nfmalloc( cur->len ); + s = cur->val = nfmalloc( cur->len + 1 ); + s[cur->len] = 0; getbytes: bytes -= socket_read( &ctx->conn, s, bytes ); ------------------------------------------------------------------------------ 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