From 368fa1632fe3dac69fd424e29303547286917893 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 17 Nov 2000 08:12:43 +0000 Subject: lso make sure not to go past the end of the buffer ;-) svn path=/trunk/; revision=6601 --- camel/providers/imap/camel-imap-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'camel') 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; -- cgit v1.2.3