[dash] Fix FTBFS due to -Werror=format-security (#1037030)

Petr Šabata psabata at fedoraproject.org
Tue Jun 24 08:49:54 UTC 2014


commit d8d579681993a1013b0850c1cc9546cf6e78d555
Author: Petr Šabata <contyk at redhat.com>
Date:   Tue Jun 24 10:49:53 2014 +0200

    Fix FTBFS due to -Werror=format-security (#1037030)

 dash-0.5.7-format-security.patch |   13 +++++++++++++
 dash.spec                        |    7 ++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/dash-0.5.7-format-security.patch b/dash-0.5.7-format-security.patch
new file mode 100644
index 0000000..d578dfb
--- /dev/null
+++ b/dash-0.5.7-format-security.patch
@@ -0,0 +1,13 @@
+diff --git a/src/jobs.c b/src/jobs.c
+index bf40204..f3af44d 100644
+--- a/src/jobs.c
++++ b/src/jobs.c
+@@ -427,7 +427,7 @@ sprint_status(char *s, int status, int sigonly)
+ 				goto out;
+ #endif
+ 		}
+-		col = fmtstr(s, 32, strsignal(st));
++		col = fmtstr(s, 32, "%s", strsignal(st));
+ #ifdef WCOREDUMP
+ 		if (WCOREDUMP(status)) {
+ 			col += fmtstr(s + col, 16, " (core dumped)");
diff --git a/dash.spec b/dash.spec
index 7596861..f8c9582 100644
--- a/dash.spec
+++ b/dash.spec
@@ -1,6 +1,6 @@
 Name:           dash
 Version:        0.5.7
-Release:        9%{?dist}
+Release:        10%{?dist}
 Summary:        Small and fast POSIX-compliant shell
 Group:          System Environment/Shells
 # BSD: DASH in general
@@ -10,6 +10,7 @@ Group:          System Environment/Shells
 License:        BSD and GPLv2+ and Public Domain and Copyright only
 URL:            http://gondor.apana.org.au/~herbert/%{name}/
 Source0:        http://gondor.apana.org.au/~herbert/%{name}/files/%{name}-%{version}.tar.gz
+Patch0:         %{name}-0.5.7-format-security.patch
 
 %description
 DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as
@@ -18,6 +19,7 @@ significantly faster than bash (the GNU Bourne-Again SHell) for most tasks.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure --bindir=/bin
@@ -41,6 +43,9 @@ fi
 %{_mandir}/man1/%{name}.1*
 
 %changelog
+* Tue Jun 24 2014 Petr Šabata <contyk at redhat.com> - 0.5.7-10
+- Fix FTBFS due to -Werror=format-security (#1037030)
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.7-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list