1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/unzip/hotfix-10-unzip-handle-pkware-verify.patch
3 # Copyright (C) 2021 - 2022 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
15 Subject: Handle the PKWare verification bit of internal attributes
16 Bug-Debian: http://bugs.debian.org/630078
17 X-Debian-version: 6.0-5
21 @@ -1729,6 +1729,13 @@
22 else if (uO.L_flag > 1) /* let -LL force lower case for all names */
25 + /* Handle the PKWare verification bit, bit 2 (0x0004) of internal
26 + attributes. If this is set, then a verification checksum is in the
27 + first 3 bytes of the external attributes. In this case all we can use
28 + for setting file attributes is the last external attributes byte. */
29 + if (G.crec.internal_file_attributes & 0x0004)
30 + G.crec.external_file_attributes &= (ulg)0xff;
32 /* do Amigas (AMIGA_) also have volume labels? */
33 if (IS_VOLID(G.crec.external_file_attributes) &&
34 (G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ ||