Blame SOURCES/cpio-2.13-exitCode.patch

808377
Subject: [PATCH 2/7] set exit code to 1 when cpio fails to store file > 4GB
808377
 (#183224)
808377
808377
diff --git a/src/copyout.c b/src/copyout.c
808377
index 8b0beb6..4b7336b 100644
808377
--- a/src/copyout.c
808377
+++ b/src/copyout.c
808377
@@ -290,7 +290,7 @@ field_width_error (const char *filename, const char *fieldname,
808377
 {
808377
   char valbuf[UINTMAX_STRSIZE_BOUND + 1];
808377
   char maxbuf[UINTMAX_STRSIZE_BOUND + 1];
808377
-  error (0, 0, _("%s: value %s %s out of allowed range 0..%s"),
808377
+  error (1, 0, _("%s: value %s %s out of allowed range 0..%s"),
808377
 	 filename, fieldname,
808377
 	 STRINGIFY_BIGINT (value, valbuf),
808377
 	 STRINGIFY_BIGINT (MAX_VAL_WITH_DIGITS (width - nul, LG_8),
808377
diff --git a/tests/CVE-2019-14866.at b/tests/CVE-2019-14866.at
808377
index e877b39..50ad60b 100644
808377
--- a/tests/CVE-2019-14866.at
808377
+++ b/tests/CVE-2019-14866.at
808377
@@ -30,6 +30,5 @@ fi
808377
 [0],
808377
 [],
808377
 [cpio: file: value size 17179869184 out of allowed range 0..8589934591
808377
-2 blocks
808377
 ])
808377
 AT_CLEANUP
808377
diff --git a/tests/testsuite b/tests/testsuite
808377
index b45c731..fd8454d 100755
808377
--- a/tests/testsuite
808377
+++ b/tests/testsuite
808377
@@ -2885,7 +2885,6 @@ fi
808377
 at_status=$? at_failed=false
808377
 $at_check_filter
808377
 echo >>"$at_stderr"; $as_echo "cpio: file: value size 17179869184 out of allowed range 0..8589934591
808377
-2 blocks
808377
 " | \
808377
   $at_diff - "$at_stderr" || at_failed=:
808377
 at_fn_diff_devnull "$at_stdout" || at_failed=: