From 9582b8384d61ecb22d8a4f9b95685b54312ba68b Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Sun, 8 Apr 2001 00:38:00 +0000 Subject: It would be a good idea to recognize '\0'. Before, this code was running 001-04-07 Peter Williams * 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 --- camel/ChangeLog | 7 +++++++ camel/providers/imap/camel-imap-utils.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 9febdce133..1e91d7fee5 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2001-04-07 Peter Williams + + * 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! + 2001-04-05 Not Zed * merge from evolution-0-10-branch to evolution-0-10-merge-0 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; -- cgit v1.2.3