diff --git a/cpio-2.10-longnames-split.patch b/cpio-2.10-longnames-split.patch new file mode 100644 index 0000000..d4517b1 --- /dev/null +++ b/cpio-2.10-longnames-split.patch @@ -0,0 +1,20 @@ +diff --git a/src/tar.c b/src/tar.c +index 97d74bc..6de8961 100644 +--- a/src/tar.c ++++ b/src/tar.c +@@ -48,10 +48,12 @@ split_long_name (const char *name, size_t length) + { + size_t i; + +- if (length > TARPREFIXSIZE) +- length = TARPREFIXSIZE+2; ++ if (length > TARPREFIXSIZE + 1) ++ length = TARPREFIXSIZE + 1; ++ else if (ISSLASH (name[length - 1])) ++ length--; + for (i = length - 1; i > 0; i--) +- if (name[i] == '/') ++ if (ISSLASH (name[i])) + break; + return i; + } diff --git a/cpio.spec b/cpio.spec index ca01032..bb3076a 100644 --- a/cpio.spec +++ b/cpio.spec @@ -3,7 +3,7 @@ Summary: A GNU archiving program Name: cpio Version: 2.11 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv3+ Group: Applications/Archiving URL: http://www.gnu.org/software/cpio/ @@ -22,6 +22,8 @@ Patch4: cpio-2.9.90-defaultremoteshell.patch Patch5: cpio-2.10-patternnamesigsegv.patch #fix rawhide buildfailure by updating gnulib's stdio.in.h Patch6: cpio-2.11-stdio.in.patch +# fix bad file name splitting while creating ustar archive (#866467) +Patch7: cpio-2.10-longnames-split.patch Requires(post): /sbin/install-info Requires(preun): /sbin/install-info Provides: bundled(gnulib) @@ -50,6 +52,7 @@ Install cpio if you need a program to manage file archives. %patch4 -p1 -b .defaultremote %patch5 -p1 -b .patternsegv %patch6 -p1 -b .gnulib +%patch7 -p1 -b .longnames autoheader @@ -99,6 +102,9 @@ fi %{_infodir}/*.info* %changelog +* Thu Oct 18 2012 Pavel Raiskup 2:10-12 +- fix for bad file name splitting while creating ustar archive (#866467) + * Wed Aug 29 2012 Ondrej Vasik 2.11-11 - add missing options to manpage (#852765)