evolution-data-server r8428 - trunk/camel



Author: fejj
Date: Sun Jan 27 16:39:07 2008
New Revision: 8428
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8428&view=rev

Log:
2008-01-27  Jeffrey Stedfast  <fejj novell com>

	* camel-mime-utils.c (rfc2047_encode_word): Use ssize_t for
	proclen so that we can compare it against -1. Fixes a coverage
	warning noticed by Nokia.



Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-mime-utils.c

Modified: trunk/camel/camel-mime-utils.c
==============================================================================
--- trunk/camel/camel-mime-utils.c	(original)
+++ trunk/camel/camel-mime-utils.c	Sun Jan 27 16:39:07 2008
@@ -1394,7 +1394,7 @@
 		ic = e_iconv_open (type, "UTF-8");
 
 	while (inlen) {
-		size_t convlen, proclen;
+		ssize_t convlen, proclen;
 		int i;
 
 		/* break up words into smaller bits, what we really want is encoded + overhead < 75,
@@ -1425,13 +1425,16 @@
 				else
 					convlen += 3;
 			}
+			
 			if (proclen >= 0 && proclen < i && convlen < (75 - strlen("=?utf-8?q?\?=")))
 				proclen = i;
+			
 			/* well, we probably have broken utf8, just copy it anyway what the heck */
 			if (proclen == -1) {
 				w(g_warning("Appear to have truncated utf8 sequence"));
 				proclen = inlen;
 			}
+			
 			memcpy(out, inptr, proclen);
 			inptr += proclen;
 			inlen -= proclen;



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