[packages/tiobench] Fix build with -Werror=format-security
megabajt
megabajt at pld-linux.org
Fri Feb 15 01:06:56 CET 2013
commit 91806e5d86c7c9fbee0516c2dae5907248732b42
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date: Fri Feb 15 01:04:03 2013 +0100
Fix build with -Werror=format-security
tiobench-format-security.patch | 29 +++++++++++++++++++++++++++++
tiobench.spec | 2 ++
2 files changed, 31 insertions(+)
---
diff --git a/tiobench.spec b/tiobench.spec
index a3d9893..368c890 100644
--- a/tiobench.spec
+++ b/tiobench.spec
@@ -8,6 +8,7 @@ License: GPL
Group: Applications/System
Source0: http://dl.sourceforge.net/tiobench/%{name}-%{version}.tar.gz
# Source0-md5: bf485bf820e693c79e6bd2a38702a128
+Patch0: %{name}-format-security.patch
URL: http://sf.net/projects/tiobench/
BuildRequires: rpm-perlprov >= 4.1-13
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -20,6 +21,7 @@ Przenośny, potężny, w pełni wątkowy program testujący wydajność I/O.
%prep
%setup -q
+%patch0 -p1
%build
%{__make} \
diff --git a/tiobench-format-security.patch b/tiobench-format-security.patch
new file mode 100644
index 0000000..443b3a6
--- /dev/null
+++ b/tiobench-format-security.patch
@@ -0,0 +1,29 @@
+--- tiobench-0.3.3/tiotest.c.formatsec 2013-02-15 00:55:05.732229659 +0100
++++ tiobench-0.3.3/tiotest.c 2013-02-15 00:56:02.128590800 +0100
+@@ -91,7 +91,7 @@ inline void checkIntZero(int value, char
+ {
+ if (value <= 0)
+ {
+- printf(mess);
++ fputs(mess, stdout);
+ printf("Try 'tiotest -h' for more information.\n");
+ exit(1);
+ }
+@@ -101,7 +101,7 @@ inline void checkLong(long value, char *
+ {
+ if (value < 0)
+ {
+- printf(mess);
++ fputs(mess, stdout);
+ printf("Try 'tiotest -h' for more information\n");
+ exit(1);
+ }
+@@ -552,7 +552,7 @@ void do_test( ThreadTest *test, int test
+ if(args.debugLevel > 4)
+ {
+ printf("Created %d threads\n", i);
+- fprintf(stderr, debugMessage);
++ fputs(debugMessage, stderr);
+ fflush(stderr);
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/tiobench.git/commitdiff/655be581fb8c65248538d4a29443da973cfcfe7e
More information about the pld-cvs-commit
mailing list