Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#717029: unzip thinks some files are symlinks

154 views
Skip to first unread message

Jeff King

unread,
Jul 16, 2013, 3:40:02 AM7/16/13
to
Package: unzip
Version: 6.0-9
Severity: normal
Tags: patch

When unzipping some large zipfiles with many entries, unzip may
sometimes treat regular files as symlinks if a symlink appeared earlier
in the zipfile. This can be seen with:

$ wget https://github.com/mono/mono/archive/master.zip
$ zipinfo master.zip | grep 'HeaderText.aspx$'
-rw---- 0.0 fat 1073 bx defN 13-Jul-08 16:47
mono-master/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/DataGridColumn/DataGridColumn_HeaderText.asp

$ unzip master.zip
[...]
finishing deferred symbolic links:
mono-master/mcs/class/System.Configuration/System.Configuration_test_net_2_0.dll.config -> Test/App.config
mono-master/mcs/class/System.Configuration/System.Configuration_test_net_4_0.dll.config -> Test/App.config
mono-master/mcs/class/System.Configuration/System.Configuration_test_net_4_5.dll.config -> Test/App.config
mono-master/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/DataGridColumn/DataGridColumn_HeaderText.aspx -> <%@ Page Language="c#" AutoEventWireup="false"
[... more cruft from the contents of the file ...]

You can unzip the file individually without any problems, though:

$ unzip master.zip mono-master/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/DataGridColumn/DataGridColumn_HeaderText.aspx


The problem seems to be that unzip reuses memory without properly
reinitializing it. Some discussion (and another example), along with a
patch that clears up the problem can be found here:

http://thread.gmane.org/gmane.comp.version-control.git/181165/focus=181173


-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.9-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages unzip depends on:
ii libbz2-1.0 1.0.6-4
ii libc6 2.17-7

unzip recommends no packages.

Versions of packages unzip suggests:
ii zip 3.0-7

-- no debconf information


--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Santiago Vila

unread,
Oct 14, 2013, 7:10:02 AM10/14/13
to
On Tue, 16 Jul 2013, Jeff King wrote:

> Package: unzip
> Version: 6.0-9
> Severity: normal
> Tags: patch
>
> When unzipping some large zipfiles with many entries, unzip may
> sometimes treat regular files as symlinks if a symlink appeared earlier
> in the zipfile. [...]

Sorry for the late reply. Thanks a lot of the report. I've forwarded
it upstream, and I will apply the proposed patch in unzip 6.0-10.

I should probably ask the release manager if they would allow this fix
for Debian 7.3.
0 new messages