Have readelf return an exit failure status when attempting to process an empty file.

Resolves: #1522732
This commit is contained in:
Nick Clifton 2017-12-06 12:29:52 +00:00
parent 76bffb9bda
commit 4ebc059f8d
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
--- binutils.orig/binutils/readelf.c 2017-07-24 15:27:09.859116315 +0100
+++ binutils-2.29/binutils/readelf.c 2017-07-24 15:30:33.557770525 +0100
@@ -18414,39 +18414,49 @@ process_archive (char * file_name, FILE
@@ -18414,39 +18414,50 @@ process_archive (char * file_name, FILE
static bfd_boolean
process_file (char * file_name)
{
@ -56,6 +56,7 @@
+ error (_("Failed to read file's magic number\n"));
fclose (file);
- return FALSE;
+ ret = FALSE;
+ goto done;
}

View File

@ -54,7 +54,7 @@
Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.29.1
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv3+
Group: Development/Tools
URL: http://sources.redhat.com/binutils
@ -667,6 +667,9 @@ exit 0
%endif # isnative
#----------------------------------------------------------------------------
* Wed Dec 06 2017 Nick Clifton <nickc@redhat.com> 2.29.1-6
- Have readelf return an exit failure status when attempting to process an empty file. (#1522732)
%changelog
* Tue Nov 28 2017 Nick Clifton <nickc@redhat.com> 2.29.1-5
- Disable PLT elision for x86/x86_64. (#1452111 and #1333481)