diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-mime-filter-crlf.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 4596e0e6e1..ea82773fd8 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2001-04-12 Dan Winship <danw@ximian.com> + + * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds + reads noted by purify + 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * camel.h: #include the pgp stuff. diff --git a/camel/camel-mime-filter-crlf.c b/camel/camel-mime-filter-crlf.c index 71a3e8bace..b6ae095810 100644 --- a/camel/camel-mime-filter-crlf.c +++ b/camel/camel-mime-filter-crlf.c @@ -78,7 +78,7 @@ filter (CamelMimeFilter *f, char *in, size_t len, size_t prespace, if (*p == '\n') *q++ = '\r'; else - if (do_dots && *(p - 1) == '\n' && *p == '.') + if (do_dots && *p == '.' && (p == in || *(p - 1) == '\n')) *q++ = '.'; *q++ = *p++; } @@ -100,7 +100,7 @@ filter (CamelMimeFilter *f, char *in, size_t len, size_t prespace, } if (do_dots) { - if (*p == '.' && *(p - 1) == '\n') { + if (*p == '.' && (p == in || *(p - 1) == '\n')) { crlf->saw_dot = TRUE; } else { if (crlf->saw_dot) { |