aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/providers/imap/camel-imap-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c
index 0677c63555..584cd1e754 100644
--- a/camel/providers/imap/camel-imap-utils.c
+++ b/camel/providers/imap/camel-imap-utils.c
@@ -639,7 +639,7 @@ imap_parse_nstring (char **str_p, int *len)
}
/* capture up until the end of the line - byte count may be a little off */
- for ( ; *(str + *len) != '\n'; (*len)++);
+ for ( ; *(str + *len) && *(str + *len) != '\n'; (*len)++);
out = g_strndup (str, *len);
*str_p = str + *len;