[mingw-binutils/el6] Patch for PR 17754
Erik van Pienbroek
epienbro at fedoraproject.org
Thu Feb 19 20:23:26 UTC 2015
commit 678cec3cc03ffdf0f6cf55c4667d7a745c0183bf
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Thu Feb 19 21:23:17 2015 +0100
Patch for PR 17754
binutils-2.25-PR17754.patch | 29 +++++++++++++++++++++++++++++
mingw-binutils.spec | 7 ++++++-
2 files changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/binutils-2.25-PR17754.patch b/binutils-2.25-PR17754.patch
new file mode 100644
index 0000000..8c1345a
--- /dev/null
+++ b/binutils-2.25-PR17754.patch
@@ -0,0 +1,29 @@
+Upstream commit 60ebc25751744f54ae5c00d1c9198ab64fcc5b33:
+
+Fixes a buffer overflow when compiling assembler for the MinGW targets.
+
+ PR binutils/17754
+ * internal.h (internal_auxent): Increase size of x_fname field to
+ 20 to allow for PE format's longer file names.
+
+diff --git a/include/coff/internal.h b/include/coff/internal.h
+index 8329564..c4f24bb 100644
+--- a/include/coff/internal.h
++++ b/include/coff/internal.h
+@@ -588,7 +588,11 @@ union internal_auxent
+
+ union
+ {
+- char x_fname[FILNMLEN];
++ /* PR 17754: We use to FILNMLEN for the size of the x_fname
++ array, but that cause problems as PE targets use a larger
++ value. We cannot use their definition of EFILNMLEN as this
++ header can be used without including any PE headers. */
++ char x_fname[20];
+ struct
+ {
+ long x_zeroes;
+--
+1.9.4
+
+
diff --git a/mingw-binutils.spec b/mingw-binutils.spec
index 4f4d6ff..c542a4d 100644
--- a/mingw-binutils.spec
+++ b/mingw-binutils.spec
@@ -2,7 +2,7 @@
Name: mingw-binutils
Version: 2.25
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Cross-compiled version of binutils for Win32 and Win64 environments
License: GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+
@@ -11,6 +11,7 @@ Group: Development/Libraries
URL: http://www.gnu.org/software/binutils/
Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
#Source0: http://www.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2
+Patch0: binutils-2.25-PR17754.patch
BuildRequires: flex
BuildRequires: bison
@@ -61,6 +62,7 @@ understand Windows executables and DLLs.
%prep
%setup -q -n binutils-%{version}
+%patch0 -p1
%build
@@ -247,6 +249,9 @@ rm -rf $RPM_BUILD_ROOT/multilib
%changelog
+* Wed Feb 18 2015 Yaakov Selkowitz <yselkowi at redhat.com> - 2.25-2
+- Patch for PR 17754.
+
* Tue Dec 23 2014 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.25-1
- Update to 2.25
More information about the scm-commits
mailing list