aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2003-01-18 11:59:55 +0800
committerLarry Ewing <lewing@src.gnome.org>2003-01-18 11:59:55 +0800
commite8b706f3e58e3b508e63598aaaf1934eaa2ddaf2 (patch)
treecc8f433667e551fac434ee40998c8a6aa2745380 /camel
parentabba8d4ea38ab43b7d4ab5fdc8881ca249b353b2 (diff)
downloadgsoc2013-evolution-e8b706f3e58e3b508e63598aaaf1934eaa2ddaf2.tar
gsoc2013-evolution-e8b706f3e58e3b508e63598aaaf1934eaa2ddaf2.tar.gz
gsoc2013-evolution-e8b706f3e58e3b508e63598aaaf1934eaa2ddaf2.tar.bz2
gsoc2013-evolution-e8b706f3e58e3b508e63598aaaf1934eaa2ddaf2.tar.lz
gsoc2013-evolution-e8b706f3e58e3b508e63598aaaf1934eaa2ddaf2.tar.xz
gsoc2013-evolution-e8b706f3e58e3b508e63598aaaf1934eaa2ddaf2.tar.zst
gsoc2013-evolution-e8b706f3e58e3b508e63598aaaf1934eaa2ddaf2.zip
only grow the buffer when we are out of space.
2003-01-17 Larry Ewing <lewing@ximian.com> * camel-mime-filter-enriched.c (enriched_to_html): only grow the buffer when we are out of space. svn path=/trunk/; revision=19513
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-mime-filter-enriched.c20
2 files changed, 16 insertions, 9 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index df4ae24db4..60b210370f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-17 Larry Ewing <lewing@ximian.com>
+
+ * camel-mime-filter-enriched.c (enriched_to_html): only grow the
+ buffer when we are out of space.
+
2003-01-14 Not Zed <NotZed@Ximian.com>
* camel-mime-parser.c (folder_scan_step): If we have no
diff --git a/camel/camel-mime-filter-enriched.c b/camel/camel-mime-filter-enriched.c
index 7f6918bd68..8cf8879162 100644
--- a/camel/camel-mime-filter-enriched.c
+++ b/camel/camel-mime-filter-enriched.c
@@ -212,14 +212,16 @@ enriched_to_html (CamelMimeFilter *filter, char *in, size_t inlen, size_t prespa
case '<':
if (!(enriched->flags & IS_RICHTEXT)) {
/* text/enriched */
- if ((outptr + 4) < outend && *inptr == '<') {
- memcpy (outptr, "&lt;", 4);
- outptr += 4;
- inptr++;
- break;
- } else {
- inptr--;
- goto backup;
+ if (*inptr == '<') {
+ if ((outptr + 4) < outend) {
+ memcpy (outptr, "&lt;", 4);
+ outptr += 4;
+ inptr++;
+ break;
+ } else {
+ inptr--;
+ goto backup;
+ }
}
} else {
/* text/richtext */
@@ -240,7 +242,7 @@ enriched_to_html (CamelMimeFilter *filter, char *in, size_t inlen, size_t prespa
goto backup;
}
}
-
+
tag = inptr;
while (inptr < inend && *inptr != '>')
inptr++;