rev 18619 - in trunk/packages/kde3libs/debian: . patches

Modestas Vainius modax at alioth.debian.org
Sat Aug 7 20:01:22 UTC 2010


Author: modax
Date: 2010-08-07 20:01:15 +0000 (Sat, 07 Aug 2010)
New Revision: 18619

Added:
   trunk/packages/kde3libs/debian/patches/67_kio_zip_file_encoding.diff
Modified:
   trunk/packages/kde3libs/debian/changelog
   trunk/packages/kde3libs/debian/patches/series
Log:
Fix corruption of zip files caused by wrong encoding of umlauts in kzip
(patch 67_kio_zip_file_encoding.diff). (Closes: #563942) Thanks to Bjoern
Ricks for the patch.

Modified: trunk/packages/kde3libs/debian/changelog
===================================================================
--- trunk/packages/kde3libs/debian/changelog	2010-08-07 19:53:03 UTC (rev 18618)
+++ trunk/packages/kde3libs/debian/changelog	2010-08-07 20:01:15 UTC (rev 18619)
@@ -8,6 +8,9 @@
   * Switch to dpkg-source format 3.0 (quilt):
     - drop simple-patchsys.mk from debian/rules;
     - add debian/patches/series file.
+  * Fix corruption of zip files caused by wrong encoding of umlauts in kzip
+    (patch 67_kio_zip_file_encoding.diff). (Closes: #563942) Thanks to Bjoern
+    Ricks for the patch.
 
  -- Modestas Vainius <modax at debian.org>  Sat, 07 Aug 2010 10:08:47 +0300
 

Added: trunk/packages/kde3libs/debian/patches/67_kio_zip_file_encoding.diff
===================================================================
--- trunk/packages/kde3libs/debian/patches/67_kio_zip_file_encoding.diff	                        (rev 0)
+++ trunk/packages/kde3libs/debian/patches/67_kio_zip_file_encoding.diff	2010-08-07 20:01:15 UTC (rev 18619)
@@ -0,0 +1,31 @@
+From: Bjoern Ricks <bjoern.ricks at intevation.de>
+Description: fix corruption in zip files caused by wrong encoding of umlauts
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563942
+Forwarded: no
+Last-Update: 2010-08-07
+
+--- a/kio/kio/kzip.cpp
++++ b/kio/kio/kzip.cpp
+@@ -954,8 +954,8 @@ bool KZip::closeArchive()
+         buffer[ 26 ] = char(mysize >> 16);
+         buffer[ 27 ] = char(mysize >> 24);
+ 
+-        buffer[ 28 ] = char(it.current()->path().length()); // filename length
+-        buffer[ 29 ] = char(it.current()->path().length() >> 8);
++        buffer[ 28 ] = char(path.length()); // filename length
++        buffer[ 29 ] = char(path.length() >> 8);
+ 
+ 	buffer[ 30 ] = char(extra_field_len);
+ 	buffer[ 31 ] = char(extra_field_len >> 8);
+@@ -1280,9 +1280,10 @@ bool KZip::doneWriting( uint size )
+     if ( d->m_extraField == ModificationTime )
+         extra_field_len = 17;	// value also used in doneWriting()
+ 
++    const QCString encodedName = QFile::encodeName(d->m_currentFile->path());
+     int csize = device()->at() -
+         d->m_currentFile->headerStart() - 30 -
+-		d->m_currentFile->path().length() - extra_field_len;
++        encodedName.length() - extra_field_len;
+     d->m_currentFile->setCompressedSize(csize);
+     //kdDebug(7040) << "usize: " << d->m_currentFile->size() << endl;
+     //kdDebug(7040) << "csize: " << d->m_currentFile->compressedSize() << endl;

Modified: trunk/packages/kde3libs/debian/patches/series
===================================================================
--- trunk/packages/kde3libs/debian/patches/series	2010-08-07 19:53:03 UTC (rev 18618)
+++ trunk/packages/kde3libs/debian/patches/series	2010-08-07 20:01:15 UTC (rev 18619)
@@ -35,6 +35,7 @@
 64_use_sys_inotify.diff
 65_gcc4.4_ftbfs.diff
 66_gcc4.5_1074155.diff
+67_kio_zip_file_encoding.diff
 97_automake_cleanup.diff
 98_buildprep.diff
 CVE-2009-0689.diff




More information about the pkg-kde-commits mailing list