[cross-binutils] Fix formatless sprintf in Score

David Howells dhowells at fedoraproject.org
Thu Mar 27 10:37:48 UTC 2014


commit 5884884b79c5dc1b988cba779d1a860d5dd15486
Author: David Howells <dhowells at redhat.com>
Date:   Thu Mar 27 09:45:30 2014 +0000

    Fix formatless sprintf in Score

 cross-binutils-2.24-score-sprintf.patch |   24 ++++++++++++++++++++++++
 cross-binutils.spec                     |    8 ++++++++
 2 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/cross-binutils-2.24-score-sprintf.patch b/cross-binutils-2.24-score-sprintf.patch
new file mode 100644
index 0000000..86ebc11
--- /dev/null
+++ b/cross-binutils-2.24-score-sprintf.patch
@@ -0,0 +1,24 @@
+diff -ur -x '*~' binutils-2.24/gas/config/tc-score7.c score-2.24/gas/config/tc-score7.c
+--- binutils-2.24/gas/config/tc-score7.c	2013-11-04 15:33:37.000000000 +0000
++++ score-2.24/gas/config/tc-score7.c	2014-03-27 09:18:21.168567604 +0000
+@@ -5337,7 +5337,7 @@
+       || ((pec_part_1.size == s7_INSN16_SIZE) && (s7_inst.size == s7_INSN_SIZE)))
+     {
+       s7_inst.error = _("pce instruction error (16 bit || 16 bit)'");
+-      sprintf (s7_inst.str, insnstr);
++      sprintf (s7_inst.str, "%s", insnstr);
+       return;
+     }
+ 
+diff -ur -x '*~' binutils-2.24/gas/config/tc-score.c score-2.24/gas/config/tc-score.c
+--- binutils-2.24/gas/config/tc-score.c	2013-11-04 15:33:37.000000000 +0000
++++ score-2.24/gas/config/tc-score.c	2014-03-27 09:19:25.576796431 +0000
+@@ -5363,7 +5363,7 @@
+ 	 || ((pec_part_1.size == s3_INSN16_SIZE) && (s3_inst.size == s3_INSN_SIZE)))
+     {
+       s3_inst.error = _("pce instruction error (16 bit || 16 bit)'");
+-      sprintf (s3_inst.str, insnstr);
++      sprintf (s3_inst.str, "%s", insnstr);
+       return;
+     }
+ 
diff --git a/cross-binutils.spec b/cross-binutils.spec
index 63bb92b..586a583 100644
--- a/cross-binutils.spec
+++ b/cross-binutils.spec
@@ -83,6 +83,9 @@ Patch15: binutils-2.24-elfnn-aarch64.patch
 # Fix decoding of abstract instance names using DW_FORM_ref_addr.
 Patch16: binutils-2.24-DW_FORM_ref_addr.patch
 
+# Fix formatless sprintfs in Score-specific code.
+Patch100: cross-binutils-2.24-score-sprintf.patch
+
 Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires: texinfo >= 4.0, gettext, flex, bison, zlib-devel
 # BZ 920545: We need pod2man in order to build the manual pages.
@@ -211,6 +214,8 @@ cd %{srcdir}
 %patch15 -p0 -b .elf-aarch64~
 %patch16 -p0 -b .ref-addr~
 
+%patch100 -p1 -b .score~
+
 # We cannot run autotools as there is an exact requirement of autoconf-2.59.
 
 # On ppc64 we might use 64KiB pages
@@ -651,6 +656,9 @@ rm -rf %{buildroot}
 %do_files xtensa-linux-gnu	%{build_xtensa}
 
 %changelog
+* Thu Mar 27 2014 David Howells <dhowells at redhat.com> - 2.24-1
+- Fix formatless sprintfs in Score.
+
 * Wed Mar 26 2014 David Howells <dhowells at redhat.com> - 2.24-1
 - Update to binutils-2.24-1.
 - Add metag arch support.


More information about the scm-commits mailing list