aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-07-05 11:59:45 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-07-05 11:59:45 +0800
commit0f51f730ac4caa7259e3b6fd70374b63baa3ecc1 (patch)
treeaa782c22a3ec60c5322123b4581f008125cf90c2
parentbf20209bbbbab216918ff84d435a8e98e22c0601 (diff)
downloadgsoc2013-evolution-0f51f730ac4caa7259e3b6fd70374b63baa3ecc1.tar.gz
gsoc2013-evolution-0f51f730ac4caa7259e3b6fd70374b63baa3ecc1.tar.zst
gsoc2013-evolution-0f51f730ac4caa7259e3b6fd70374b63baa3ecc1.zip
Fix the assertion slightly, if we have a little bit of input the output
2001-07-05 Not Zed <NotZed@Ximian.com> * camel-mime-filter-basic.c (filter): Fix the assertion slightly, if we have a little bit of input the output size could be larger, since we store upto 3 chars in the state. svn path=/trunk/; revision=10786
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/camel-mime-filter-basic.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 455ba9e9ee..e4434010ea 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,9 @@
2001-07-05 Not Zed <NotZed@Ximian.com>
+ * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
+ if we have a little bit of input the output size could be larger,
+ since we store upto 3 chars in the state.
+
* camel-folder-summary.c
(camel_folder_summary_info_new_from_message): When indexing a new
record, create a pseudo word 'ibexindexed' so we can always tell
diff --git a/camel/camel-mime-filter-basic.c b/camel/camel-mime-filter-basic.c
index be38933683..056110695c 100644
--- a/camel/camel-mime-filter-basic.c
+++ b/camel/camel-mime-filter-basic.c
@@ -158,9 +158,9 @@ filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, s
break;
case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
/* output can't possibly exceed the input size */
- camel_mime_filter_set_size(mf, len, FALSE);
+ camel_mime_filter_set_size(mf, len+3, FALSE);
newlen = base64_decode_step(in, len, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len);
+ g_assert(newlen <= len+3);
break;
case CAMEL_MIME_FILTER_BASIC_QP_DEC:
/* output can't possibly exceed the input size */