From 5ad7c48966b922e426d48bfe7b9bb480fc2660a9 Mon Sep 17 00:00:00 2001 From: Petr Stodulka Date: Nov 27 2014 13:40:57 +0000 Subject: fixed option -X works now --- diff --git a/unzip-6.0-x-option.patch b/unzip-6.0-x-option.patch new file mode 100644 index 0000000..72c77ae --- /dev/null +++ b/unzip-6.0-x-option.patch @@ -0,0 +1,28 @@ +--- ./process.c.orig 2009-03-06 02:25:10.000000000 +0100 ++++ ./process.c 2013-09-12 10:51:16.000000000 +0200 +@@ -2901,9 +2901,9 @@ + */ + + #ifdef IZ_HAVE_UXUIDGID +- if (eb_len >= EB_UX3_MINLEN +- && z_uidgid != NULL +- && (*((EB_HEADSIZE + 0) + ef_buf) == 1) ++ if ((eb_len >= EB_UX3_MINLEN) ++ && (z_uidgid != NULL) ++ && ((*((EB_HEADSIZE + 0) + ef_buf) == 1))) + /* only know about version 1 */ + { + uch uid_size; +@@ -2915,10 +2915,10 @@ + flags &= ~0x0ff; /* ignore any previous UNIX field */ + + if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf, +- uid_size, z_uidgid[0]) ++ uid_size, &z_uidgid[0]) + && + read_ux3_value((EB_HEADSIZE + uid_size + 3) + ef_buf, +- gid_size, z_uidgid[1]) ) ++ gid_size, &z_uidgid[1]) ) + { + flags |= EB_UX2_VALID; /* signal success */ + } diff --git a/unzip.spec b/unzip.spec index 9f06f5c..6171549 100644 --- a/unzip.spec +++ b/unzip.spec @@ -25,6 +25,7 @@ Patch7: unzip-6.0-fix-recmatch.patch # Update process.c Patch8: unzip-6.0-symlink.patch Patch9: unzip-6.0-valgrind.patch +Patch10: unzip-6.0-x-option.patch URL: http://www.info-zip.org/UnZip.html BuildRequires: bzip2-devel @@ -50,9 +51,13 @@ a zip archive. %patch7 -p1 -b .recmatch %patch8 -p1 -b .symlink %patch9 -p1 -b .valgrind +%patch10 -p1 -b .x-option %build -make -f unix/Makefile CF_NOOPT="-I. -DUNIX -DNOMEMCPY $RPM_OPT_FLAGS" generic_gcc %{?_smp_mflags} +# IZ_HAVE_UXUIDGID is needed for right functionality of unzip -X +# NOMEMCPY solve problem with memory overlapping - decomression is slowly, +# but successfull. +make -f unix/Makefile CF_NOOPT="-I. -DUNIX -DNOMEMCPY -DIZ_HAVE_UXUIDGID $RPM_OPT_FLAGS" generic_gcc %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT @@ -66,7 +71,10 @@ make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{ %changelog * Thu Nov 20 2014 Petr Stodulka - 6.0-13 -- Fix unitialized reads in unzip (#558738). +- Fix unitialized reads (#558738) +- Fix fix broken -X option - never worked before. Added -DIZ_HAVE_UXUIDGID + option for compilation. + (#935202) * Thu Nov 06 2014 Petr Stodulka - 6.0-12 - Fix producing of incorrect output due to memcpy overlapping