From 1aa0682c3ece2c56d5234b074adcc004ca8e336b Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Sep 30 2013 07:18:27 +0000 Subject: cpio: treat read() errors properly Resolves: #996150 Version: 2.11-24 --- 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 +AuthorDate: Mon Sep 23 15:35:30 2013 +0200 +Commit: Pavel Raiskup +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 9949039..2b98feb 100644 --- a/cpio.spec +++ b/cpio.spec @@ -1,7 +1,7 @@ Summary: A GNU archiving program Name: cpio Version: 2.11 -Release: 23%{?dist} +Release: 24%{?dist} License: GPLv3+ Group: Applications/Archiving URL: http://www.gnu.org/software/cpio/ @@ -30,6 +30,11 @@ Patch8: cpio-2.11-crc-fips-nit.patch # ~> downstream Patch9: 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 +Patch10: cpio-2.11-treat-read-errors.patch + Requires(post): /sbin/install-info Requires(preun): /sbin/install-info Provides: bundled(gnulib) @@ -62,6 +67,7 @@ Install cpio if you need a program to manage file archives. %patch7 -p1 -b .longnames %patch8 -p1 -b .sum32-fips %patch9 -p1 -b .crc-big-files +%patch10 -p1 -b .treat-read-errors autoreconf -v @@ -110,9 +116,10 @@ fi %{_infodir}/*.info* %changelog -* Fri Sep 20 2013 Pavel Raiskup - 2.11-23 +* Mon Sep 30 2013 Pavel Raiskup - 2.11-24 - properly trim "crc" checksum to 32 bits (#1001965) - remove unneeded patch for config.gues/config.sub (#951442) +- allow treat read() errors (#996150) * Sat Aug 03 2013 Fedora Release Engineering - 2.11-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild