Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > e548512dcc847653815f1b7adc710b15 > files > 9

libvmime07-0.7.1-4.fc13.src.rpm

Patch by Zarafa <http://www.zarafa.com/> - fixes iconv conversion with source buffers > 64Kb not to add a
'?' and skip one byte of the input buffer.

--- libvmime-0.7.1/src/charset.cpp					2005-03-18 22:26:46.000000000 +0100
+++ libvmime-0.7.1/src/charset.cpp.charset-output-buffer-full		2008-07-07 13:51:33.414160106 +0200
@@ -206,10 +206,12 @@
 				out += STRINGT(static_cast <ovt*>(buffer), sizeof(buffer) - outBytesLeft);
 
 				// Ignore this "blocking" character and continue
+				if (outBytesLeft > 0) {
 				out += '?';
 				++inBuffer;
 				--inBytesLeft;
 			}
+			}
 			else
 			{
 				out += STRINGT(static_cast <ovt*>(buffer), sizeof(buffer) - outBytesLeft);