[cpio/f19] cpio: treat read() errors properly
Pavel Raiskup
praiskup at fedoraproject.org
Tue Oct 8 19:51:43 UTC 2013
commit 3280a7298136325f541ce11c413345c2738751fd
Author: Pavel Raiskup <praiskup at redhat.com>
Date: Mon Sep 30 09:18:27 2013 +0200
cpio: treat read() errors properly
Resolves: #996150
Version: 2.11-21
cpio-2.11-treat-read-errors.patch | 41 +++++++++++++++++++++++++++++++++++++
cpio.spec | 11 ++++++++-
2 files changed, 50 insertions(+), 2 deletions(-)
---
diff --git a/cpio-2.11-treat-read-errors.patch b/cpio-2.11-treat-read-errors.patch
new file mode 100644
index 0000000..a92922c
--- /dev/null
+++ b/cpio-2.11-treat-read-errors.patch
@@ -0,0 +1,41 @@
+commit 57288911a7882d663d6aa231158a3616f2ab2ed9
+Author: Pavel Raiskup <praiskup at redhat.com>
+AuthorDate: Mon Sep 23 15:35:30 2013 +0200
+Commit: Pavel Raiskup <praiskup at redhat.com>
+CommitDate: Mon Sep 23 16:42:11 2013 +0200
+
+ Use ssize_t for input buffer size
+
+ Bug report: https://bugzilla.redhat.com/show_bug.cgi?id=996150
+
+ * src/global.c: Use ssize_t rather than size_t for input_size.
+ * src/extern.h: Likewise.
+
+diff --git a/src/extern.h b/src/extern.h
+index ef00242..1e7193e 100644
+--- a/src/extern.h
++++ b/src/extern.h
+@@ -83,7 +83,8 @@ extern int debug_flag;
+ extern char *input_buffer, *output_buffer;
+ extern char *in_buff, *out_buff;
+ extern size_t input_buffer_size;
+-extern size_t input_size, output_size;
++extern ssize_t input_size;
++extern size_t output_size;
+ extern off_t input_bytes, output_bytes;
+
+ extern char *directory_name;
+diff --git a/src/global.c b/src/global.c
+index e08e188..a08006e 100644
+--- a/src/global.c
++++ b/src/global.c
+@@ -156,7 +156,8 @@ size_t input_buffer_size;
+ char *in_buff, *out_buff;
+
+ /* Current number of bytes stored at `input_buff' and `output_buff'. */
+-size_t input_size, output_size;
++ssize_t input_size;
++size_t output_size;
+
+ off_t input_bytes, output_bytes;
+
diff --git a/cpio.spec b/cpio.spec
index 9e569d4..4911ed3 100644
--- a/cpio.spec
+++ b/cpio.spec
@@ -31,9 +31,14 @@ Patch8: cpio-2.11-crc-fips-nit.patch
Patch9: cpio-2.11-arm-config-sub-guess.patch
# Properly trim "crc" checksum to 32 bit number
-# ~> downstream
+# ~> upstream
Patch10: cpio-2.11-crc-large-files.patch
+# Allow treat read() errors by changing type of input_size to signed integer.
+# ~> downstream
+# ~> http://lists.gnu.org/archive/html/bug-cpio/2013-09/msg00005.html
+Patch11: cpio-2.11-treat-read-errors.patch
+
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Provides: bundled(gnulib)
@@ -67,6 +72,7 @@ Install cpio if you need a program to manage file archives.
%patch8 -p1 -b .sum32-fips
%patch9 -p1 -b .arm-config-guess-sub
%patch10 -p1 -b .crc-big-files
+%patch11 -p1 -b .treat-read-errors
autoreconf -v
@@ -115,8 +121,9 @@ fi
%{_infodir}/*.info*
%changelog
-* Fri Sep 20 2013 Pavel Raiskup <praiskup at redhat.com> - 2.11-21
+* Tue Oct 08 2013 Pavel Raiskup <praiskup at redhat.com> - 2.11-21
- properly trim "crc" checksum to 32 bits (#1001965)
+- allow treat read() errors (#996150)
* Wed Mar 27 2013 Pavel Raiskup <praiskup at redhat.com> - 2.11-20
- fix another bogus date in changelog
More information about the scm-commits
mailing list