Package: libzipios++0v5 Version: 0.1.5.9+cvs.2007.04.28-11build1 Severity: normal Tags: patch X-Debbugs-Cc: werner.wm.ma...@gmx.de
Dear Maintainer, when using the class ZipFile to open a zip file and calling getInputStream() to access a certain file within the zip archive then trying to read in the content returns garbage. The problem occurs because inside the constructor of ZipInputStreambuf there is already a call of getNextEntry() but inside ZipFile::getInputStream() there is a second call of getNextEntry(). The problem was caused by upstream back in 2007. For some reason the call of getNextEntry() was removed from ZipInputStreambuf. In a second change the getNextEntry() was added to ZipFile::getInputStream(). Debian fetched this upstream version on Sat, 28 Apr 2007 02:11:43 +0900. Obviously this version caused a problem to the enigma package (#421498) and as a fix the call of getNextEntry() was readded to ZipInputStreambuf but was not removed any more from ZipFile::getInputStream() and is still present in the current version. Affected by this bug is the recently released FreeCAD 1.0 that fails to extract a PNG thumbnail from a FCStd file. Note: The latest FreeCAD version in Debian testing or unstable is 0.21 and this version is not affected by this bug. As a fix for the problem all what needs to be done is to remove 'zis->getNextEntry();' from ZipFile::getInputStream. Best Regards, Werner Mayer --- zipios++-0.1.5.9+cvs.2007.04.28.orig/src/zipfile.cpp +++ zipios++-0.1.5.9+cvs.2007.04.28/src/zipfile.cpp @@ -71,7 +71,6 @@ istream *ZipFile::getInputStream( const ZipInputStream *zis( new ZipInputStream( _filename, static_cast< const ZipCDirEntry * >( ent.get() )-> getLocalHeaderOffset() + _vs.startOffset() ) ) ; - zis->getNextEntry(); return zis; } } P.S. For more details have a look at https://github.com/FreeCAD/FreeCAD/issues/13676 -- System Information: Debian Release: bookworm/sid APT prefers jammy-updates APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), (100, 'jammy-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.15.0-126-generic (SMP w/4 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages libzipios++0v5 depends on: ii libc6 2.35-0ubuntu3.8 ii libgcc-s1 12.3.0-1ubuntu1~22.04 ii libstdc++6 12.3.0-1ubuntu1~22.04 ii zlib1g 1:1.2.11.dfsg-2ubuntu9.2 libzipios++0v5 recommends no packages. libzipios++0v5 suggests no packages. -- no debconf information