From d89f072f8d45dd65ad62188a9e8b5f903ea2faf5 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 9 Apr 2002 13:45:44 +0000 Subject: If we get multiple Content-Type header values, change subsequent headers 2002-04-09 Not Zed * camel-mime-part.c (construct_from_parser): If we get multiple Content-Type header values, change subsequent headers to X-Invalid-Content-Type so it doesn't wreck processing. This fixes the reported case in #18929, but i dont know if it fixes the original posters problems. 2002-04-08 Not Zed * camel-vtrash-folder.c (vtrash_move_messages_to): If we find we're moving from the vtrash to another folder, we need to convert the uid from a vfolder uid to the source uid (+8). Fix for #20886. Also changed to batch multiple moves to different folders so they are done as efficiently as possible rather than one at a time. * camel-mime-utils.c (base64_decode_step): If we only get passed '=', we back track only if we actually output any data. Fix for #21716. (quoted_decode): Pass out size_t instead of int, and use 0 instead of -1 for error since its not signed. This will fix similar bug to above in different circumstances since the result is taken as unsigned. This is only an internal func. (quoted_encode): Return size_t just for consistency. * camel-block-file.c (block_file_validate_root): Comment out the debug and move it into a warning when the validation fails. svn path=/trunk/; revision=16394 --- camel/camel-mime-utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'camel/camel-mime-utils.c') diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index 328a6dfce3..148eea9a80 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -375,7 +375,7 @@ base64_decode_step(unsigned char *in, size_t len, unsigned char *out, int *state while (inptr>in && i) { inptr--; if (camel_mime_base64_rank[*inptr] != 0xff) { - if (*inptr == '=') + if (*inptr == '=' && outptr>out) outptr--; i--; } @@ -869,7 +869,7 @@ quoted_decode_step(unsigned char *in, size_t len, unsigned char *out, int *saves this is for the "Q" encoding of international words, which is slightly different than plain quoted-printable (mainly by allowing 0x20 <> _) */ -static int +static size_t quoted_decode(const unsigned char *in, size_t len, unsigned char *out) { register const unsigned char *inptr; @@ -910,13 +910,13 @@ quoted_decode(const unsigned char *in, size_t len, unsigned char *out) if (ret==0) { return outptr-out; } - return -1; + return 0; } /* rfc2047 version of quoted-printable */ /* safemask is the mask to apply to the camel_mime_special_table to determine what characters can safely be included without encoding */ -static int +static size_t quoted_encode (const unsigned char *in, size_t len, unsigned char *out, unsigned short safemask) { register const unsigned char *inptr, *inend; -- cgit