[gentoo-commits] repo/gentoo:master commit in: app-arch/cpio/files/, app-arch/cpio/

2022-12-27 Thread Sam James
commit: 35f18448ac5707b834a0e7df35c934c0bef430b7
Author: Sam James  gentoo  org>
AuthorDate: Tue Dec 27 23:53:21 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 28 00:32:13 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35f18448

app-arch/cpio: drop 2.12-r1, 2.13-r3

Bug: https://bugs.gentoo.org/807088
Signed-off-by: Sam James  gentoo.org>

 app-arch/cpio/Manifest|  1 -
 app-arch/cpio/cpio-2.12-r1.ebuild | 26 
 app-arch/cpio/cpio-2.13-r3.ebuild | 50 ---
 app-arch/cpio/files/cpio-2.12-gcc-10.patch| 27 
 app-arch/cpio/files/cpio-2.12-name-overflow.patch | 15 ---
 5 files changed, 119 deletions(-)

diff --git a/app-arch/cpio/Manifest b/app-arch/cpio/Manifest
index c9fcf3fa150e..1bc147148d44 100644
--- a/app-arch/cpio/Manifest
+++ b/app-arch/cpio/Manifest
@@ -1,3 +1,2 @@
-DIST cpio-2.12.tar.bz2 1258605 BLAKE2B 
4b6d42a1d8aaeaa980cab5894b2e264451e96a108f2c3aa89d3e6fde0bff338e026ee233ebd7c8cf41f3c926d42d38b866778244db774055736ca8792889e160
 SHA512 
0cd4da5f2fbca179ab4e666a5f878414c086a5f98bce4c76273f21d9b2a6fe422d901b5d453826c5f81bbe363aa015047a1e99779ad1a451c8feca6205c63120
 DIST cpio-2.13-CVE-2021-38185.patch.xz 7844 BLAKE2B 
e338950e03c3eed3b4288435c9c75af8f0c3497b43680be4ee347e628db7cfac616b437a848094bf82cfc2c7f29d59b388bf0f6368b3b99770022e3f9533be11
 SHA512 
4d2cafefcd1ae9d86cb5171de2896799713490dfd9ed27d3dce0886fa4588c8df2b16ad8508a5dbb9155c9de6e40b6d1083bdb4774d967193a270a1dcbe37a33
 DIST cpio-2.13.tar.bz2 1354559 BLAKE2B 
45d77723acb55f15c8574ab5a2fdff6fb1767629d177dd3416b0268e9f82ee6bdd11b4fa591ef020efccbdc3f4918cf77263169da1a0f6422dfe1a9712295778
 SHA512 
459398e69f7f48201c04d1080218c50f75edcf114ffcbb236644ff6fcade5fcc566929bdab2ebe9be5314828d6902e43b348a8adf28351df978c8989590e93a3

diff --git a/app-arch/cpio/cpio-2.12-r1.ebuild 
b/app-arch/cpio/cpio-2.12-r1.ebuild
deleted file mode 100644
index 684d6aa82dfa..
--- a/app-arch/cpio/cpio-2.12-r1.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="A file archival tool which can also read and write tar files"
-HOMEPAGE="https://www.gnu.org/software/cpio/cpio.html;
-SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
-
-LICENSE="GPL-3+"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="nls"
-
-PATCHES=(
-   "${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295
-   "${FILESDIR}"/${PN}-2.12-name-overflow.patch #572428
-   "${FILESDIR}"/${PN}-2.12-gcc-10.patch #705900
-)
-
-src_configure() {
-   econf \
-   $(use_enable nls) \
-   --bindir="${EPREFIX}"/bin \
-   --with-rmt="${EPREFIX}"/usr/sbin/rmt
-}

diff --git a/app-arch/cpio/cpio-2.13-r3.ebuild 
b/app-arch/cpio/cpio-2.13-r3.ebuild
deleted file mode 100644
index a09ffc983c4c..
--- a/app-arch/cpio/cpio-2.13-r3.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools
-
-DESCRIPTION="A file archival tool which can also read and write tar files"
-HOMEPAGE="https://www.gnu.org/software/cpio/cpio.html;
-SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
-SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-CVE-2021-38185.patch.xz;
-
-LICENSE="GPL-3+"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="nls"
-
-PATCHES=(
-   "${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295
-   "${WORKDIR}"/${P}-CVE-2021-38185.patch
-   "${FILESDIR}"/${PN}-2.13-sysmacros-glibc-2.26.patch
-   
"${FILESDIR}"/${PN}-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch
-)
-
-src_prepare() {
-   default
-
-   # Drop after 2.13 (only here for CVE patch)
-   eautoreconf
-}
-
-src_configure() {
-   local myeconfargs=(
-   $(use_enable nls)
-   --bindir="${EPREFIX}"/bin
-   --with-rmt="${EPREFIX}"/usr/sbin/rmt
-   # install as gcpio for better compatibility with non-GNU 
userland
-   --program-prefix=g
-   )
-
-   econf "${myeconfargs[@]}"
-}
-
-src_install() {
-   default
-
-   # make cpio a symlink
-   dosym gcpio /bin/cpio
-   dosym gcpio.1 /usr/share/man/man1/cpio.1
-}

diff --git a/app-arch/cpio/files/cpio-2.12-gcc-10.patch 
b/app-arch/cpio/files/cpio-2.12-gcc-10.patch
deleted file mode 100644
index 9c7d7edd88f5..
--- 

[gentoo-commits] repo/gentoo:master commit in: app-arch/cpio/files/, app-arch/cpio/

2022-10-18 Thread Sam James
commit: a52ec56f85b11ee1faceddac7874666ad6d2b164
Author: Sam James  gentoo  org>
AuthorDate: Tue Oct 18 19:11:52 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Oct 18 19:12:00 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a52ec56f

app-arch/cpio: revert CVE-2015-1197 fix for --no-absolute-filenames

At least we can have the fix for CVE-2021-38185.

Bug: https://bugs.gentoo.org/699456
Bug: https://bugs.gentoo.org/807088
Closes: https://bugs.gentoo.org/700020
Signed-off-by: Sam James  gentoo.org>

 .../{cpio-2.13-r1.ebuild => cpio-2.13-r2.ebuild}   |  1 +
 ...e-filenames-revert-CVE-2015-1197-handling.patch | 47 ++
 2 files changed, 48 insertions(+)

diff --git a/app-arch/cpio/cpio-2.13-r1.ebuild 
b/app-arch/cpio/cpio-2.13-r2.ebuild
similarity index 92%
rename from app-arch/cpio/cpio-2.13-r1.ebuild
rename to app-arch/cpio/cpio-2.13-r2.ebuild
index 6005349fe120..c3924649236b 100644
--- a/app-arch/cpio/cpio-2.13-r1.ebuild
+++ b/app-arch/cpio/cpio-2.13-r2.ebuild
@@ -19,6 +19,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295
"${WORKDIR}"/${P}-CVE-2021-38185.patch
"${FILESDIR}"/${PN}-2.13-sysmacros-glibc-2.26.patch
+   
"${FILESDIR}"/${PN}-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch
 )
 
 src_prepare() {

diff --git 
a/app-arch/cpio/files/cpio-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch
 
b/app-arch/cpio/files/cpio-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch
new file mode 100644
index ..326489a54943
--- /dev/null
+++ 
b/app-arch/cpio/files/cpio-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch
@@ -0,0 +1,47 @@
+https://sources.debian.org/patches/cpio/2.13%2Bdfsg-7.1/revert-CVE-2015-1197-handling.patch/
+https://bugs.gentoo.org/700020
+
+From: Chris Lamb 
+Date: Sat, 1 Feb 2020 13:36:37 +0100
+Subject: Fix a regression in handling of CVE-2015-1197 &
+ --no-absolute-filenames.
+
+See:
+
+  * https://bugs.debian.org/946267
+  * https://bugs.debian.org/946469
+
+This reverts (most of): 
https://git.savannah.gnu.org/cgit/cpio.git/diff/?id=45b0ee2b407913c533f7ded8d6f8cbeec16ff6ca=3177d660a4c62a6acb538b0f7c54ba423698889a
+--- a/src/copyin.c
 b/src/copyin.c
+@@ -646,8 +646,6 @@ copyin_link (struct cpio_file_stat *file_hdr, int 
in_file_des)
+   link_name = xstrdup (file_hdr->c_tar_linkname);
+ }
+ 
+-  cpio_safer_name_suffix (link_name, true, !no_abs_paths_flag, false);
+-  
+   res = UMASKED_SYMLINK (link_name, file_hdr->c_name,
+file_hdr->c_mode);
+   if (res < 0 && create_dir_flag)
+--- a/tests/testsuite
 b/tests/testsuite
+@@ -2787,7 +2787,7 @@ read at_status <"$at_status_file"
+ #AT_START_14
+ at_fn_group_banner 14 'CVE-2015-1197.at:17' \
+   "CVE-2015-1197 (--no-absolute-filenames for symlinks)" ""
+-at_xfail=no
++at_xfail=yes
+ (
+   $as_echo "14. $at_setup_line: testing $at_desc ..."
+   $at_traceon
+
+--- a/tests/CVE-2015-1197.at
 b/tests/CVE-2015-1197.at
+@@ -15,6 +15,7 @@
+ # along with this program.  If not, see .
+ 
+ AT_SETUP([CVE-2015-1197 (--no-absolute-filenames for symlinks)])
++AT_XFAIL_IF([true])
+ AT_CHECK([
+ tempdir=$(pwd)/tmp
+ mkdir $tempdir



[gentoo-commits] repo/gentoo:master commit in: app-arch/cpio/files/, app-arch/cpio/

2022-10-18 Thread Sam James
commit: 30d0bdb974112f7857d6e50efb7d6b4b2b1ec295
Author: Sam James  gentoo  org>
AuthorDate: Tue Oct 18 18:40:04 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Oct 18 18:41:04 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30d0bdb9

app-arch/cpio: patch regressions in 2.13, allowing CVE-2021-38185 fix 
(unkeyworded)

To be keyworded after testing on more machines.

Bug: https://bugs.gentoo.org/699456
Bug: https://bugs.gentoo.org/807088
Bug: https://bugs.gentoo.org/854192
Closes: https://bugs.gentoo.org/700020
Signed-off-by: Sam James  gentoo.org>

 app-arch/cpio/Manifest |  1 +
 app-arch/cpio/cpio-2.13-r1.ebuild  | 39 ++
 .../files/cpio-2.13-sysmacros-glibc-2.26.patch | 12 +++
 3 files changed, 52 insertions(+)

diff --git a/app-arch/cpio/Manifest b/app-arch/cpio/Manifest
index e3d8f9e77f92..c9fcf3fa150e 100644
--- a/app-arch/cpio/Manifest
+++ b/app-arch/cpio/Manifest
@@ -1,2 +1,3 @@
 DIST cpio-2.12.tar.bz2 1258605 BLAKE2B 
4b6d42a1d8aaeaa980cab5894b2e264451e96a108f2c3aa89d3e6fde0bff338e026ee233ebd7c8cf41f3c926d42d38b866778244db774055736ca8792889e160
 SHA512 
0cd4da5f2fbca179ab4e666a5f878414c086a5f98bce4c76273f21d9b2a6fe422d901b5d453826c5f81bbe363aa015047a1e99779ad1a451c8feca6205c63120
+DIST cpio-2.13-CVE-2021-38185.patch.xz 7844 BLAKE2B 
e338950e03c3eed3b4288435c9c75af8f0c3497b43680be4ee347e628db7cfac616b437a848094bf82cfc2c7f29d59b388bf0f6368b3b99770022e3f9533be11
 SHA512 
4d2cafefcd1ae9d86cb5171de2896799713490dfd9ed27d3dce0886fa4588c8df2b16ad8508a5dbb9155c9de6e40b6d1083bdb4774d967193a270a1dcbe37a33
 DIST cpio-2.13.tar.bz2 1354559 BLAKE2B 
45d77723acb55f15c8574ab5a2fdff6fb1767629d177dd3416b0268e9f82ee6bdd11b4fa591ef020efccbdc3f4918cf77263169da1a0f6422dfe1a9712295778
 SHA512 
459398e69f7f48201c04d1080218c50f75edcf114ffcbb236644ff6fcade5fcc566929bdab2ebe9be5314828d6902e43b348a8adf28351df978c8989590e93a3

diff --git a/app-arch/cpio/cpio-2.13-r1.ebuild 
b/app-arch/cpio/cpio-2.13-r1.ebuild
new file mode 100644
index ..6005349fe120
--- /dev/null
+++ b/app-arch/cpio/cpio-2.13-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A file archival tool which can also read and write tar files"
+HOMEPAGE="https://www.gnu.org/software/cpio/cpio.html;
+SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
+SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-CVE-2021-38185.patch.xz;
+
+LICENSE="GPL-3+"
+SLOT="0"
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295
+   "${WORKDIR}"/${P}-CVE-2021-38185.patch
+   "${FILESDIR}"/${PN}-2.13-sysmacros-glibc-2.26.patch
+)
+
+src_prepare() {
+   default
+
+   # Drop after 2.13 (only here for CVE patch)
+   eautoreconf
+}
+
+src_configure() {
+   local myeconfargs=(
+   $(use_enable nls)
+   --bindir="${EPREFIX}"/bin
+   --with-rmt="${EPREFIX}"/usr/sbin/rmt
+   )
+
+   econf "${myeconfargs[@]}"
+}

diff --git a/app-arch/cpio/files/cpio-2.13-sysmacros-glibc-2.26.patch 
b/app-arch/cpio/files/cpio-2.13-sysmacros-glibc-2.26.patch
new file mode 100644
index ..0f902f060f86
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.13-sysmacros-glibc-2.26.patch
@@ -0,0 +1,12 @@
+--- a/am/ax_compile_check_rettype.m4
 b/am/ax_compile_check_rettype.m4
+@@ -70,6 +70,7 @@ AC_CACHE_VAL(AC_CV_NAME,
+ [for ac_type in char short int long "long long" $4
+  do 
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include 
+ #include 
+ $3
+ ]], [[switch (0) case 0: case (sizeof ($1($2)) == sizeof ($ac_type)):;]])], 
[AC_CV_NAME=$ac_type])
+ 
+ 



[gentoo-commits] repo/gentoo:master commit in: app-arch/cpio/files/, app-arch/cpio/

2020-02-18 Thread Sergei Trofimovich
commit: d78585ef0dc6ded24811254595ea3741f196bc46
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Tue Feb 18 20:46:27 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Tue Feb 18 20:46:27 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d78585ef

app-arch/cpio: backport tweak for gcc-10, bug #705900

Closes: https://bugs.gentoo.org/705900
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich  gentoo.org>

 app-arch/cpio/cpio-2.12-r1.ebuild  |  1 +
 app-arch/cpio/cpio-2.13.ebuild |  3 ++-
 app-arch/cpio/files/cpio-2.12-gcc-10.patch | 27 +++
 3 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/app-arch/cpio/cpio-2.12-r1.ebuild 
b/app-arch/cpio/cpio-2.12-r1.ebuild
index a32dcef968d..2c74b76cbc1 100644
--- a/app-arch/cpio/cpio-2.12-r1.ebuild
+++ b/app-arch/cpio/cpio-2.12-r1.ebuild
@@ -17,6 +17,7 @@ IUSE="nls"
 src_prepare() {
epatch "${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295
epatch "${FILESDIR}"/${PN}-2.12-name-overflow.patch #572428
+   epatch "${FILESDIR}"/${PN}-2.12-gcc-10.patch #705900
 }
 
 src_configure() {

diff --git a/app-arch/cpio/cpio-2.13.ebuild b/app-arch/cpio/cpio-2.13.ebuild
index 30557dbd043..4f5966691a5 100644
--- a/app-arch/cpio/cpio-2.13.ebuild
+++ b/app-arch/cpio/cpio-2.13.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -14,6 +14,7 @@ IUSE="nls"
 
 PATCHES=(
"${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295
+   "${FILESDIR}"/${PN}-2.12-gcc-10.patch #705900
 )
 
 src_configure() {

diff --git a/app-arch/cpio/files/cpio-2.12-gcc-10.patch 
b/app-arch/cpio/files/cpio-2.12-gcc-10.patch
new file mode 100644
index 000..9c7d7edd88f
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.12-gcc-10.patch
@@ -0,0 +1,27 @@
+From 641d3f489cf6238bb916368d4ba0d9325a235afb Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff 
+Date: Mon, 20 Jan 2020 07:45:39 +0200
+Subject: Minor fix * src/global.c: Remove superfluous declaration of
+ program_name
+
+---
+ src/global.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/global.c b/src/global.c
+index fb3abe9..acf92bc 100644
+--- a/src/global.c
 b/src/global.c
+@@ -184,9 +184,6 @@ unsigned int warn_option = 0;
+ /* Extract to standard output? */
+ bool to_stdout_option = false;
+ 
+-/* The name this program was run with.  */
+-char *program_name;
+-
+ /* A pointer to either lstat or stat, depending on whether
+dereferencing of symlinks is done for input files.  */
+ int (*xstat) ();
+-- 
+cgit v1.2.1
+



[gentoo-commits] repo/gentoo:master commit in: app-arch/cpio/files/, app-arch/cpio/

2016-02-14 Thread Mike Frysinger
commit: 5a7c109933aac0f9de580513346ebe94f3acd4f2
Author: Mike Frysinger  gentoo  org>
AuthorDate: Sun Feb 14 19:46:49 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Sun Feb 14 19:47:27 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a7c1099

app-arch/cpio: fix small buffer overflow #572428

 app-arch/cpio/cpio-2.12-r1.ebuild | 28 +++
 app-arch/cpio/files/cpio-2.12-name-overflow.patch | 15 
 2 files changed, 43 insertions(+)

diff --git a/app-arch/cpio/cpio-2.12-r1.ebuild 
b/app-arch/cpio/cpio-2.12-r1.ebuild
new file mode 100644
index 000..b946520
--- /dev/null
+++ b/app-arch/cpio/cpio-2.12-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="A file archival tool which can also read and write tar files"
+HOMEPAGE="https://www.gnu.org/software/cpio/cpio.html;
+SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd 
~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux 
~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+src_prepare() {
+   epatch "${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295
+   epatch "${FILESDIR}"/${PN}-2.12-name-overflow.patch #572428
+}
+
+src_configure() {
+   econf \
+   $(use_enable nls) \
+   --bindir="${EPREFIX}"/bin \
+   --with-rmt="${EPREFIX}"/usr/sbin/rmt
+}

diff --git a/app-arch/cpio/files/cpio-2.12-name-overflow.patch 
b/app-arch/cpio/files/cpio-2.12-name-overflow.patch
new file mode 100644
index 000..f852468
--- /dev/null
+++ b/app-arch/cpio/files/cpio-2.12-name-overflow.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/572428
+https://lists.gnu.org/archive/html/bug-cpio/2016-01/msg2.html
+http://seclists.org/oss-sec/2016/q1/136
+
+--- a/src/copyin.c
 b/src/copyin.c
+@@ -1385,6 +1385,8 @@
+ break;
+   }
+ 
++  if (file_hdr.c_namesize <= 1)
++  file_hdr.c_name = xrealloc (file_hdr.c_name, 2);
+   cpio_safer_name_suffix (file_hdr.c_name, false, !no_abs_paths_flag,
+ false);
+