aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-04-08 08:38:00 +0800
committerPeter Williams <peterw@src.gnome.org>2001-04-08 08:38:00 +0800
commit9582b8384d61ecb22d8a4f9b95685b54312ba68b (patch)
tree932a2d99dab424758b21357bf8efb09581da107c /camel/providers/imap
parentc457df3f5cd3a68579c8c7f5fc549d0754c61d5f (diff)
downloadgsoc2013-evolution-9582b8384d61ecb22d8a4f9b95685b54312ba68b.tar
gsoc2013-evolution-9582b8384d61ecb22d8a4f9b95685b54312ba68b.tar.gz
gsoc2013-evolution-9582b8384d61ecb22d8a4f9b95685b54312ba68b.tar.bz2
gsoc2013-evolution-9582b8384d61ecb22d8a4f9b95685b54312ba68b.tar.lz
gsoc2013-evolution-9582b8384d61ecb22d8a4f9b95685b54312ba68b.tar.xz
gsoc2013-evolution-9582b8384d61ecb22d8a4f9b95685b54312ba68b.tar.zst
gsoc2013-evolution-9582b8384d61ecb22d8a4f9b95685b54312ba68b.zip
It would be a good idea to recognize '\0'. Before, this code was running
001-04-07 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It would be a good idea to recognize '\0'. Before, this code was running off the ends of strings and intermittently coredumping (if it didn't hit an imap_atom_char first) -- whoops! svn path=/trunk/; revision=9202
Diffstat (limited to 'camel/providers/imap')
-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 1ec8e79eaf..e7c0a050ca 100644
--- a/camel/providers/imap/camel-imap-utils.c
+++ b/camel/providers/imap/camel-imap-utils.c
@@ -275,7 +275,7 @@ imap_parse_string_generic (char **str_p, int *len, int type)
return NULL;
} else if (type == IMAP_ASTRING &&
imap_is_atom_char ((unsigned char)*str)) {
- while (imap_is_atom_char ((unsigned char)*str))
+ while (imap_is_atom_char ((unsigned char)*str) && *str != '\0')
str++;
*len = str - *str_p;