diff --git a/SOURCES/gzip-1.5-nonblock.patch b/SOURCES/gzip-1.5-nonblock.patch new file mode 100644 index 0000000..53aa392 --- /dev/null +++ b/SOURCES/gzip-1.5-nonblock.patch @@ -0,0 +1,35 @@ +diff --git a/util.c b/util.c +index 46bc89d..34fd789 100644 +--- a/util.c ++++ b/util.c +@@ -139,9 +139,29 @@ read_buffer (fd, buf, cnt) + voidp buf; + unsigned int cnt; + { ++ int len; ++#ifdef INT_MAX + if (INT_MAX < cnt) + cnt = INT_MAX; +- return read (fd, buf, cnt); ++#endif ++ len = read (fd, buf, cnt); ++ ++#if defined F_SETFL && O_NONBLOCK && defined EAGAIN ++ /* Iput files are opened O_NONBLOCK for security reasons. On some ++ file systems this can cause read to fail with errno == EAGAIN. */ ++ if (len < 0 && errno == EAGAIN) ++ { ++ int flags = fcntl (fd, F_GETFL); ++ if (0 <= flags) ++ { ++ if (! (flags & O_NONBLOCK)) ++ errno = EAGAIN; ++ else if (fcntl (fd, F_SETFL, flags & ~O_NONBLOCK) != -1) ++ len = read (fd, buf, cnt); ++ } ++ } ++#endif ++ return len; + } + + /* Likewise for 'write'. */ diff --git a/SPECS/gzip.spec b/SPECS/gzip.spec index c4b4b53..9a72d7d 100644 --- a/SPECS/gzip.spec +++ b/SPECS/gzip.spec @@ -1,7 +1,7 @@ Summary: The GNU data compression program Name: gzip Version: 1.5 -Release: 4%{?dist} +Release: 7%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Group: Applications/File @@ -13,6 +13,7 @@ Patch5: gzip-1.3.9-addsuffix.patch Patch6: gzip-1.3.5-cve-2006-4338.patch Patch7: gzip-1.3.13-cve-2006-4337.patch Patch8: gzip-1.3.5-cve-2006-4337_len.patch +Patch9: gzip-1.5-nonblock.patch # Fixed in upstream code. # http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/378 URL: http://www.gzip.org/ @@ -46,6 +47,7 @@ very commonly used data compression program. %patch6 -p1 -b .4338 %patch7 -p1 -b .4337 %patch8 -p1 -b .4337l +%patch9 -p1 -b .nonblock %build export DEFS="NO_ASM" @@ -86,6 +88,16 @@ fi %{_infodir}/gzip.info* %changelog +* Fri Jan 24 2014 Daniel Mach - 1.5-7 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 1.5-6 +- Mass rebuild 2013-12-27 + +* Fri Nov 15 2013 Petr Stodulka - 1.5-5 +- fix issue with nonblocking open for PAR and OFL file + Resolves: rhbz#1028052 + * Thu Feb 14 2013 Fedora Release Engineering - 1.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild