[gmime/gmime-2-4] Fixed GMIME_UUENCODE_LEN calculation



commit d64a0b4c5ff7f08647debb4b273fa2b96f27f2b7
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Sun Jan 31 21:48:37 2010 -0500

    Fixed GMIME_UUENCODE_LEN calculation
    
    2010-01-31  Jeffrey Stedfast  <fejj novell com>
    
    	* gmime/gmime-encodings.h (GMIME_UUENCODE_LEN): Fixed
    	calculation to prevent possible buffer overflows in
    	g_mime_encoding_flush()

 ChangeLog               |    5 +++++
 gmime/gmime-encodings.h |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e95788e..5a2b4cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-31  Jeffrey Stedfast  <fejj novell com>
+
+	* gmime/gmime-encodings.h (GMIME_UUENCODE_LEN): Fixed to prevent
+	possible buffer overflows.
+
 2010-01-30  Jeffrey Stedfast  <fejj novell com>
 
 	* README: Bumped version
diff --git a/gmime/gmime-encodings.h b/gmime/gmime-encodings.h
index 9ed90a8..8376b21 100644
--- a/gmime/gmime-encodings.h
+++ b/gmime/gmime-encodings.h
@@ -91,7 +91,7 @@ const char *g_mime_content_encoding_to_string (GMimeContentEncoding encoding);
  * Returns: the number of output bytes needed to uuencode an input
  * buffer of size @x.
  **/
-#define GMIME_UUENCODE_LEN(x)      ((size_t) (((((x) + 2) / 45) * 62) + 62))
+#define GMIME_UUENCODE_LEN(x)      ((size_t) (((((x) + 2) / 45) * 62) + 64))
 
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]