From 0f51f730ac4caa7259e3b6fd70374b63baa3ecc1 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 5 Jul 2001 03:59:45 +0000 Subject: Fix the assertion slightly, if we have a little bit of input the output 2001-07-05 Not Zed * 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 --- camel/ChangeLog | 4 ++++ camel/camel-mime-filter-basic.c | 4 ++-- 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 + * 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 */ -- cgit v1.2.3