xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-extended/unzip/unzip/symlink.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunUnzip doesn't handle large zip files well and crashes:
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun"This only happens if you have more then 16k entries and when one of
4*4882a593Smuzhiyunthe 16k entry infos is reused it happend to be previously used for
5*4882a593Smuzhiyuna symlink entry."
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunThis patch is taken from Fedora (https://bugzilla.redhat.com/show_bug.cgi?id=972427)
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunUpstream-Status: Inactive-Upstream [need a new release]
10*4882a593SmuzhiyunSigned-off-by: Ross Burton <ross.burton@intel.com>
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun--- unzip60/process.c.sav	2013-06-09 12:08:57.070392264 +0200
13*4882a593Smuzhiyun+++ unzip60/process.c	2013-06-09 12:10:08.641696988 +0200
14*4882a593Smuzhiyun@@ -1751,6 +1751,12 @@
15*4882a593Smuzhiyun         = (G.crec.general_purpose_bit_flag & (1 << 11)) == (1 << 11);
16*4882a593Smuzhiyun #endif
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun+#ifdef SYMLINKS
19*4882a593Smuzhiyun+    /* Initialize the symlink flag, may be set by the platform-specific
20*4882a593Smuzhiyun+       mapattr function.  */
21*4882a593Smuzhiyun+    G.pInfo->symlink = 0;
22*4882a593Smuzhiyun+#endif
23*4882a593Smuzhiyun+
24*4882a593Smuzhiyun     return PK_COOL;
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun } /* end function process_cdir_file_hdr() */
27