aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap/camel-imap-stream.c')
-rw-r--r--camel/providers/imap/camel-imap-stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/camel/providers/imap/camel-imap-stream.c b/camel/providers/imap/camel-imap-stream.c
index d7fb0ee75c..9f45ed2291 100644
--- a/camel/providers/imap/camel-imap-stream.c
+++ b/camel/providers/imap/camel-imap-stream.c
@@ -168,6 +168,8 @@ stream_read (CamelStream *stream, char *buffer, size_t n)
if (*q == '\n')
part_len--;
}
+ /* we want to make sure we get up to the last \n */
+ for ( ; *q && *q != '\n'; q++, part_len++);
imap_stream->cache = g_strndup (p, part_len);
g_free (result);