Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 898389 Details for
Bug 996150
Segmentation fault (core dumped) when cpio compress /sys directory
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Check that read() did not fail
0001-cpio-check-for-read-errors-properly.patch (text/plain), 2.63 KB, created by
Pavel Raiskup
on 2014-05-22 13:10:00 UTC
(
hide
)
Description:
Check that read() did not fail
Filename:
MIME Type:
Creator:
Pavel Raiskup
Created:
2014-05-22 13:10:00 UTC
Size:
2.63 KB
patch
obsolete
>From 46e7756783c323fc46ad3776ddda243326dc5b31 Mon Sep 17 00:00:00 2001 >From: Pavel Raiskup <praiskup@redhat.com> >Date: Thu, 22 May 2014 14:59:21 +0200 >Subject: [PATCH] cpio: check for read() errors properly > >Resolves: #996150 >Version: 2.10-12 >--- > cpio-2.11-treat-read-errors.patch | 22 ++++++++++++++++++++++ > cpio.spec | 10 +++++++++- > 2 files changed, 31 insertions(+), 1 deletion(-) > create mode 100644 cpio-2.11-treat-read-errors.patch > >diff --git a/cpio-2.11-treat-read-errors.patch b/cpio-2.11-treat-read-errors.patch >new file mode 100644 >index 0000000..b01e60a >--- /dev/null >+++ b/cpio-2.11-treat-read-errors.patch >@@ -0,0 +1,22 @@ >+diff --git a/src/util.c b/src/util.c >+index ab49890..7332891 100644 >+--- a/src/util.c >++++ b/src/util.c >+@@ -203,7 +203,7 @@ tape_fill_input_buffer (int in_des, int num_bytes) >+ get_next_reel (in_des); >+ input_size = rmtread (in_des, input_buffer, num_bytes); >+ } >+- if (input_size < 0) >++ if (input_size == SAFE_READ_ERROR) >+ error (1, errno, _("read error")); >+ if (input_size == 0) >+ { >+@@ -224,7 +224,7 @@ disk_fill_input_buffer (int in_des, off_t num_bytes) >+ in_buff = input_buffer; >+ num_bytes = (num_bytes < DISK_IO_BLOCK_SIZE) ? num_bytes : DISK_IO_BLOCK_SIZE; >+ input_size = read (in_des, input_buffer, num_bytes); >+- if (input_size < 0) >++ if (input_size == SAFE_READ_ERROR) >+ { >+ input_size = 0; >+ return (-1); >diff --git a/cpio.spec b/cpio.spec >index 14f97b7..6bac2ee 100644 >--- a/cpio.spec >+++ b/cpio.spec >@@ -3,7 +3,7 @@ > Summary: A GNU archiving program > Name: cpio > Version: 2.10 >-Release: 11%{?dist} >+Release: 12%{?dist} > License: GPLv3+ > Group: Applications/Archiving > URL: http://www.gnu.org/software/cpio/ >@@ -32,6 +32,10 @@ Patch8: cpio-2.10-patternnamesigsegv.patch > Patch9: cpio-2.10-rtapeliboverflow.patch > # fix bad file name splitting while creating ustar archive (#866467) > Patch10: cpio-2.10-longnames-split.patch >+ >+# "really" check for read() return value >+Patch11: cpio-2.11-treat-read-errors.patch >+ > Requires(post): /sbin/install-info > Requires(preun): /sbin/install-info > BuildRequires: texinfo, autoconf, gettext, rmt >@@ -63,6 +67,7 @@ Install cpio if you need a program to manage file archives. > %patch8 -p1 -b .patternsegv > %patch9 -p1 -b .rtapelib > %patch10 -p1 -b .longnames >+%patch11 -p1 -b .safe-read-check > > autoheader > >@@ -111,6 +116,9 @@ fi > %{_infodir}/*.info* > > %changelog >+* Thu May 22 2014 Pavel Raiskup <praiskup@redhat.com> - 2.10-12 >+- better check for read() error >+ > * Thu Oct 18 2012 Pavel Raiskup <praiskup@redhat.com> 2:10-11 > - fix for bad file name splitting while creating ustar archive (#866467) > >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 996150
: 898389