rev 5897 - in trunk/packages/kdepim/debian: . patches
Sune Vuorela
pusling-guest at alioth.debian.org
Fri Apr 13 12:43:50 UTC 2007
Author: pusling-guest
Date: 2007-04-13 12:43:50 +0000 (Fri, 13 Apr 2007)
New Revision: 5897
Added:
trunk/packages/kdepim/debian/patches/29_kdepim_kio_imap_dos.diff
Modified:
trunk/packages/kdepim/debian/changelog
Log:
add patch from upstreams
Modified: trunk/packages/kdepim/debian/changelog
===================================================================
--- trunk/packages/kdepim/debian/changelog 2007-04-13 12:35:02 UTC (rev 5896)
+++ trunk/packages/kdepim/debian/changelog 2007-04-13 12:43:50 UTC (rev 5897)
@@ -5,13 +5,14 @@
+++ Changes by Sune Vuorela
* Pull 2 patches from pim+ branch to fix compilation with pilot-link 0.12.2
(Closes: #414843)
- * Pull a lot of kmail patches from upstream to fix various crashes
+ * Pull a lot of kmail patches from upstream to fix various crashes
(Closes: #413527, #398182, #412261, #407363, #280223, ) and probably a
couple of more
* Add clamav patch - thanks to Stephen Gran (Closes: 412861)
* The kpilot scripts needs debconf to be able to clean up after itself
+ * Add a patch from upstream to fix a theoretical kio-imap infinite loop.
- -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Fri, 13 Apr 2007 13:50:38 +0200
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Fri, 13 Apr 2007 14:42:30 +0200
kdepim (4:3.5.6.dfsg.1-2) experimental; urgency=low
Added: trunk/packages/kdepim/debian/patches/29_kdepim_kio_imap_dos.diff
===================================================================
--- trunk/packages/kdepim/debian/patches/29_kdepim_kio_imap_dos.diff 2007-04-13 12:35:02 UTC (rev 5896)
+++ trunk/packages/kdepim/debian/patches/29_kdepim_kio_imap_dos.diff 2007-04-13 12:43:50 UTC (rev 5897)
@@ -0,0 +1,79 @@
+Index: kdepim/kioslaves/imap4/mimeheader.cc
+===================================================================
+--- kdepim/kioslaves/imap4/mimeheader.cc (revision 647616)
++++ kdepim/kioslaves/imap4/mimeheader.cc (revision 647617)
+@@ -339,35 +339,47 @@
+ {
+ val = rfcDecoder::encodeRFC2231String (aValue);
+ }
++ //kdDebug(7116) << "mimeHeader::setParameter() - val = '" << val << "'" << endl;
+ //see if it needs to be truncated
+ vlen = val.length();
+ llen = aLabel.length();
+- if (vlen + llen + 4 > 80 && llen < 80 - 8 )
++ if (vlen + llen + 4 > 80 && llen < 80 - 8 - 2 )
+ {
+- int limit = 80 - 8 - (int)llen;
++ const int limit = 80 - 8 - 2 - (int)llen;
++ // the -2 is there to allow extending the length of a part of val
++ // by 1 or 2 in order to prevent an encoded character from being
++ // split in half
+ int i = 0;
+ QString shortValue;
+ QCString shortLabel;
+
+ while (!val.isEmpty ())
+ {
+- //don't truncate the encoded chars
+- int offset = 0;
+- if (limit > int(vlen))
+- limit = vlen;
+- offset = val.findRev ('%', limit);
+- if (offset == limit - 1 || offset == limit - 2)
+- {
+-// cout << "offset " << offset << "-" << limit << "=" << limit-offset << endl;
+- offset = limit - offset;
++ int partLen; // the length of the next part of the value
++ if ( limit >= int(vlen) ) {
++ // the rest of the value fits completely into one continued header
++ partLen = vlen;
+ }
+- else
+- offset = 0;
+- shortValue = val.left (limit - offset);
++ else {
++ partLen = limit;
++ // make sure that we don't split an encoded char in half
++ if ( val[partLen-1] == '%' ) {
++ partLen += 2;
++ }
++ else if ( partLen > 1 && val[partLen-2] == '%' ) {
++ partLen += 1;
++ }
++ // make sure partLen does not exceed vlen (could happen in case of
++ // an incomplete encoded char)
++ if ( partLen > int(vlen) ) {
++ partLen = vlen;
++ }
++ }
++ shortValue = val.left( partLen );
+ shortLabel.setNum (i);
+ shortLabel = aLabel + "*" + shortLabel;
+- val = val.right (vlen - limit + offset);
+- vlen = vlen - limit + offset;
++ val = val.right( vlen - partLen );
++ vlen = vlen - partLen;
+ if (encoded)
+ {
+ if (i == 0)
+@@ -376,7 +388,9 @@
+ }
+ shortLabel += "*";
+ }
+-// cout << shortLabel << "-" << shortValue << endl;
++ //kdDebug(7116) << "mimeHeader::setParameter() - shortLabel = '" << shortLabel << "'" << endl;
++ //kdDebug(7116) << "mimeHeader::setParameter() - shortValue = '" << shortValue << "'" << endl;
++ //kdDebug(7116) << "mimeHeader::setParameter() - val = '" << val << "'" << endl;
+ aDict->insert (shortLabel, new QString (shortValue));
+ i++;
+ }
More information about the pkg-kde-commits
mailing list