Fix: Unzip Fails on Large Zip Files

Resolves: RHEL-45994
This commit is contained in:
Jakub Martisko 2024-07-03 14:24:43 +02:00
parent c4f9b2d5f5
commit 3503c49f85
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,15 @@
From: "Steven M. Schweda" <sms@antinode.info>
Subject: Fix lame code in fileio.c
Bug-Debian: https://bugs.debian.org/929502
X-Debian-version: 6.0-23
--- a/fileio.c
+++ b/fileio.c
@@ -2477,6 +2477,7 @@
*/
return (((zusz_t)sig[7]) << 56)
+ (((zusz_t)sig[6]) << 48)
+ + (((zusz_t)sig[5]) << 40)
+ (((zusz_t)sig[4]) << 32)
+ (zusz_t)((((ulg)sig[3]) << 24)
+ (((ulg)sig[2]) << 16)

View File

@ -7,7 +7,7 @@
Summary: A utility for unpacking zip files Summary: A utility for unpacking zip files
Name: unzip Name: unzip
Version: 6.0 Version: 6.0
Release: 56%{?dist} Release: 57%{?dist}
License: BSD License: BSD
Source: http://downloads.sourceforge.net/infozip/unzip60.tar.gz Source: http://downloads.sourceforge.net/infozip/unzip60.tar.gz
@ -73,6 +73,8 @@ Patch31: unzip-zipbomb-part5.patch
Patch32: unzip-zipbomb-part6.patch Patch32: unzip-zipbomb-part6.patch
Patch33: unzip-zipbomb-switch.patch Patch33: unzip-zipbomb-switch.patch
Patch34: unzip-6.0-fix-warning-messages-on-big-files.patch
URL: http://www.info-zip.org/UnZip.html URL: http://www.info-zip.org/UnZip.html
BuildRequires: make BuildRequires: make
BuildRequires: bzip2-devel, gcc BuildRequires: bzip2-devel, gcc
@ -124,6 +126,7 @@ a zip archive.
%patch31 -p1 %patch31 -p1
%patch32 -p1 %patch32 -p1
%patch33 -p1 %patch33 -p1
%patch34 -p1
%build %build
# Use the C implementation of CRC instead of assembly (only on i386, other architectures use C by default) # Use the C implementation of CRC instead of assembly (only on i386, other architectures use C by default)
@ -147,6 +150,11 @@ make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Wed Jul 03 2024 Jakub Martisko <jamartis@redhat.com> - 6.0-57
- Fix: Unzip Fails on Large Zip Files
- Use the patch from Debian dealing with this
Resolves: RHEL-45994
* Wed Jan 26 2022 Jakub Martisko <jamartis@redhat.com> - 6.0-56 * Wed Jan 26 2022 Jakub Martisko <jamartis@redhat.com> - 6.0-56
- Use the C crc implementation instead of the asm (i686 only, other arches already use C) - Use the C crc implementation instead of the asm (i686 only, other arches already use C)
Related: rhbz#2045075 Related: rhbz#2045075