[packages/ziptool] Fix build with -Werror=format-security
megabajt
megabajt at pld-linux.org
Fri Feb 15 17:39:44 CET 2013
commit 0ab5b63b8cf5f7105cfbd0dd0d53fef9b9fb4948
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date: Fri Feb 15 17:39:23 2013 +0100
Fix build with -Werror=format-security
ziptool-format-security.patch | 11 +++++++++++
ziptool.spec | 2 ++
2 files changed, 13 insertions(+)
---
diff --git a/ziptool.spec b/ziptool.spec
index 9986460..bec5bda 100644
--- a/ziptool.spec
+++ b/ziptool.spec
@@ -8,6 +8,7 @@ Group: Applications/System
Source0: ftp://wolfpack.twu.net/users/wolfpack/%{name}-%{version}.tar.bz2
# Source0-md5: e873a323c4cfdca95cb109a704dd34ee
Patch0: %{name}-llh.patch
+Patch1: %{name}-format-security.patch
URL: http://wolfpack.twu.net/utilities.html#ziptool
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -22,6 +23,7 @@ nośnika; jaztool i ziptool pozwalają zrobić to pod Linuksem.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%{__make} CFLAGS="%{rpmcflags}"
diff --git a/ziptool-format-security.patch b/ziptool-format-security.patch
new file mode 100644
index 0000000..d187410
--- /dev/null
+++ b/ziptool-format-security.patch
@@ -0,0 +1,11 @@
+--- ziptool-1.4.0/ziptool.c.formatsec 2013-02-15 17:34:38.758667943 +0100
++++ ziptool-1.4.0/ziptool.c 2013-02-15 17:37:55.757600709 +0100
+@@ -542,7 +542,7 @@ static int jazip_get_password(
+ * Keep reading from stdin until a newline '\n' character
+ * is received.
+ */
+- (void)printf(prompt);
++ (void)fputs(prompt, stdout);
+ (void)fflush(stdout);
+
+ *buf = '\0';
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ziptool.git/commitdiff/0ab5b63b8cf5f7105cfbd0dd0d53fef9b9fb4948
More information about the pld-cvs-commit
mailing list