summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-08-28 16:58:08 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2010-08-28 17:23:22 +0300
commit54602578633b24e84b0caf5be588cdeda8a3bd5c (patch)
tree9bf8e39e71d21fd01adfbefdfdaf0fd8bc80d680
parent446ba82c52a3b232b1dceb25633852cdf24d4b1a (diff)
downloadmailutils-54602578633b24e84b0caf5be588cdeda8a3bd5c.tar.gz
mailutils-54602578633b24e84b0caf5be588cdeda8a3bd5c.tar.bz2
Fix encode2047 test.
* mailbox/base64.c (_base64_encoder): Fix the use of uninitialized variable. * mailbox/rfc2047.c (mu_rfc2047_encode): Rewind the input stream before reading from it.
-rw-r--r--mailbox/base64.c2
-rw-r--r--mailbox/rfc2047.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/mailbox/base64.c b/mailbox/base64.c
index f70a40baa..8ceba2699 100644
--- a/mailbox/base64.c
+++ b/mailbox/base64.c
@@ -197,7 +197,7 @@ _base64_encoder (void *xd MU_ARG_UNUSED,
break;
}
- if (isize <= 3)
+ if (iobuf->isize <= 3)
{
if (cmd == mu_filter_lastbuf)
pad = 1;
diff --git a/mailbox/rfc2047.c b/mailbox/rfc2047.c
index df19d9fe8..06d94c295 100644
--- a/mailbox/rfc2047.c
+++ b/mailbox/rfc2047.c
@@ -267,7 +267,7 @@ mu_rfc2047_encode (const char *charset, const char *encoding,
return rc;
mu_stream_write (input_stream, text, strlen (text), NULL);
-
+ mu_stream_seek (input_stream, 0, MU_SEEK_SET, NULL);
rc = mu_filter_create (&output_stream, input_stream,
encoding, MU_FILTER_ENCODE, MU_STREAM_READ);
if (rc == 0)

Return to:

Send suggestions and report system problems to the System administrator.