[evolution-data-server] Bug 735342 - camel: Fix potential integer overflow found by Coverity scan
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 735342 - camel: Fix potential integer overflow found by Coverity scan
- Date: Mon, 8 Sep 2014 14:05:39 +0000 (UTC)
commit d59bc75452edefb76a87ddbf1cdec1ba7193369a
Author: Philip Withnall <philip withnall collabora co uk>
Date: Mon Sep 8 16:03:18 2014 +0200
Bug 735342 - camel: Fix potential integer overflow found by Coverity scan
camel/camel-mime-parser.c | 8 ++++----
camel/camel-mime-parser.h | 2 +-
configure.ac | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index b2d16b8..c461361 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -686,7 +686,7 @@ camel_mime_parser_step (CamelMimeParser *parser,
* Returns the address of the internal buffer in @databuffer,
* and the length of useful data.
*
- * @len may be specified as INT_MAX, in which case you will
+ * @len may be specified as %G_MAXSSIZE, in which case you will
* get the full remainder of the buffer at each call.
*
* Note that no parsing of the data read through this function
@@ -695,14 +695,14 @@ camel_mime_parser_step (CamelMimeParser *parser,
*
* Returns: The number of bytes available, or -1 on error.
**/
-gint
+gssize
camel_mime_parser_read (CamelMimeParser *parser,
const gchar **databuffer,
- gint len,
+ gssize len,
GError **error)
{
struct _header_scan_state *s = _PRIVATE (parser);
- gint there;
+ gintptr there;
if (len == 0)
return 0;
diff --git a/camel/camel-mime-parser.h b/camel/camel-mime-parser.h
index bae3229..bbec727 100644
--- a/camel/camel-mime-parser.h
+++ b/camel/camel-mime-parser.h
@@ -120,7 +120,7 @@ camel_mime_parser_state_t camel_mime_parser_state (CamelMimeParser *parser);
void camel_mime_parser_push_state (CamelMimeParser *mp, camel_mime_parser_state_t newstate, const gchar
*boundary);
/* read through the parser */
-gint camel_mime_parser_read (CamelMimeParser *parser, const gchar **databuffer, gint len, GError **error);
+gssize camel_mime_parser_read (CamelMimeParser *parser, const gchar **databuffer, gssize len, GError
**error);
/* get content type for the current part/header */
CamelContentType *camel_mime_parser_content_type (CamelMimeParser *parser);
diff --git a/configure.ac b/configure.ac
index 13c7f48..aaa861f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,7 +130,7 @@ LIBEBOOK_CONTACTS_CURRENT=0
LIBEBOOK_CONTACTS_REVISION=0
LIBEBOOK_CONTACTS_AGE=0
-LIBCAMEL_CURRENT=50
+LIBCAMEL_CURRENT=51
LIBCAMEL_REVISION=0
LIBCAMEL_AGE=0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]