diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-12-11 03:14:32 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-12-11 03:14:32 +0800 |
commit | 081f6dbb1bbf4add00bfb67b3e05bba4a432d56e (patch) | |
tree | 877e0e0b0881244d6ed68f29575a6c84152e26bf /camel/camel-mime-utils.h | |
parent | bc9bb5281bcb7e3460b4ecc349cab14e3af812f1 (diff) | |
download | gsoc2013-evolution-081f6dbb1bbf4add00bfb67b3e05bba4a432d56e.tar.gz gsoc2013-evolution-081f6dbb1bbf4add00bfb67b3e05bba4a432d56e.tar.zst gsoc2013-evolution-081f6dbb1bbf4add00bfb67b3e05bba4a432d56e.zip |
Protect against either of the types being NULL.
2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-utils.c (header_content_type_simple): Protect against
either of the types being NULL.
2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-filter-basic.c (filter): If complete() allocates
len+2 bytes for the out buffer, so should this. See bug #16371 for
an example case.
2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
* camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
* camel-pgp-context.c: The return value of iconv() is a size_t,
not an int.
* camel-mime-part-utils.c (convert_buffer): Always use size_t args
for iconv().
* camel-mime-filter-charset.c (complete): Always use size_t args
for iconv().
(filter): Same.
* camel-mime-utils.c (header_address_fold): Make headerlen a
size_t instead of an int.
(header_fold): Same.
(base64_encode_close): We should be returning a size_t and inlen
should also be a size_t.
(base64_encode_step): Same here.
(base64_decode_step): Here too.
(base64_encode_simple): And here...
(base64_decode_simple): Same.
(uuencode_close): We should also use size_t's here...
(uuencode_step): And here too.
(uudecode_step): And also here.
(quoted_encode_close): Same idea here.
(quoted_encode_step): Again here.
(quoted_decode_step): Here too.
(quoted_encode): Input length should be a size_t.
(rfc2047_decode_word): Same.
(g_string_append_len): Here too.
(append_8bit): "
(rfc2047_encode_word): "
(quote_word): "
(hex_decode): "
(rfc2184_decode): Use size_t's with iconv().
(header_decode_param): Same.
svn path=/trunk/; revision=14956
Diffstat (limited to 'camel/camel-mime-utils.h')
-rw-r--r-- | camel/camel-mime-utils.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h index 77dcae8430..fcd1a06fa5 100644 --- a/camel/camel-mime-utils.h +++ b/camel/camel-mime-utils.h @@ -148,8 +148,8 @@ void header_raw_clear(struct _header_raw **list); char *header_raw_check_mailing_list(struct _header_raw **list); /* fold a header */ -char *header_address_fold (const char *in, int headerlen); -char *header_fold (const char *in, int headerlen); +char *header_address_fold (const char *in, size_t headerlen); +char *header_fold (const char *in, size_t headerlen); char *header_unfold (const char *in); /* decode a header which is a simple token */ @@ -186,23 +186,24 @@ char *header_location_decode(const char *in); void header_mime_decode(const char *in, int *maj, int *min); /* do incremental base64/quoted-printable (de/en)coding */ -int base64_decode_step(unsigned char *in, int len, unsigned char *out, int *state, unsigned int *save); +size_t base64_decode_step(unsigned char *in, size_t len, unsigned char *out, int *state, unsigned int *save); -int base64_encode_step(unsigned char *in, int len, gboolean break_lines, unsigned char *out, int *state, int *save); -int base64_encode_close(unsigned char *in, int inlen, gboolean break_lines, unsigned char *out, int *state, int *save); +size_t base64_encode_step(unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save); +size_t base64_encode_close(unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save); -int uudecode_step (unsigned char *in, int len, unsigned char *out, int *state, guint32 *save, char *uulen); -int uuencode_step (unsigned char *in, int len, unsigned char *out, unsigned char *uubuf, int *state, - guint32 *save, char *uulen); -int uuencode_close (unsigned char *in, int len, unsigned char *out, unsigned char *uubuf, int *state, - guint32 *save, char *uulen); +size_t uudecode_step (unsigned char *in, size_t len, unsigned char *out, int *state, guint32 *save, char *uulen); -int quoted_decode_step(unsigned char *in, int len, unsigned char *out, int *savestate, int *saveme); +size_t uuencode_step (unsigned char *in, size_t len, unsigned char *out, unsigned char *uubuf, int *state, + guint32 *save, char *uulen); +size_t uuencode_close (unsigned char *in, size_t len, unsigned char *out, unsigned char *uubuf, int *state, + guint32 *save, char *uulen); -int quoted_encode_step(unsigned char *in, int len, unsigned char *out, int *state, int *save); -int quoted_encode_close(unsigned char *in, int len, unsigned char *out, int *state, int *save); +size_t quoted_decode_step(unsigned char *in, size_t len, unsigned char *out, int *savestate, int *saveme); -char *base64_encode_simple (const char *data, int len); -int base64_decode_simple (char *data, int len); +size_t quoted_encode_step(unsigned char *in, size_t len, unsigned char *out, int *state, int *save); +size_t quoted_encode_close(unsigned char *in, size_t len, unsigned char *out, int *state, int *save); + +char *base64_encode_simple (const char *data, size_t len); +size_t base64_decode_simple (char *data, size_t len); #endif /* ! _CAMEL_MIME_UTILS_H */ |