- fix build with -Werror=format-security (#1037228)

This commit is contained in:
Dan Horák 2013-12-03 15:19:08 +01:00
parent 1a12858f1e
commit 84596f9c46
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 02d46e95acfca2ac3ca85a3f1c3d271a04e29206 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 3 Dec 2013 14:44:36 +0100
Subject: [PATCH] fix build with -Werror=format-security
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Dan Horák <dan@danny.cz>
---
usr/sbin/pkcsslotd/log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/sbin/pkcsslotd/log.c b/usr/sbin/pkcsslotd/log.c
index 949d95d..a2292ac 100755
--- a/usr/sbin/pkcsslotd/log.c
+++ b/usr/sbin/pkcsslotd/log.c
@@ -823,7 +823,7 @@ BOOL PKCS_Log ( pLogHandle phLog, char *Format, va_list ap ) {
/* Always log to syslog, if we're using it */
if ( pInfo->UseSyslog ) {
- syslog(pInfo->LogLevel, Buffer);
+ syslog(pInfo->LogLevel, "%s", Buffer);
}
return TRUE;
--
1.8.1.4

View File

@ -3,7 +3,7 @@
Name: opencryptoki
Summary: Implementation of the PKCS#11 (Cryptoki) specification v2.11
Version: 3.0
Release: 6%{?dist}
Release: 7%{?dist}
License: CPL
Group: System Environment/Base
URL: http://sourceforge.net/projects/opencryptoki
@ -23,6 +23,8 @@ Patch3: opencryptoki-3.0-opencryptoki-man.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1033284
# post-3.0 upstream fixes
Patch4: opencryptoki-3.0-bz1033284.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1037228
Patch5: opencryptoki-3.0-format.patch
Requires(pre): shadow-utils coreutils sed
BuildRequires: openssl-devel
BuildRequires: trousers-devel
@ -167,6 +169,7 @@ cryptographic hardware such as IBM 4764 or 4765 that uses the
%patch2 -p1 -b .unit
%patch3 -p1 -b .opencryptoki-man
%patch4 -p1 -b .bz1033284
%patch5 -p1 -b .format
# Upstream tarball has unnecessary executable perms set on the sources
find . -name '*.[ch]' -print0 | xargs -0 chmod -x
@ -297,6 +300,9 @@ exit 0
%changelog
* Tue Dec 03 2013 Dan Horák <dan[at]danny.cz> - 3.0-7
- fix build with -Werror=format-security (#1037228)
* Fri Nov 22 2013 Dan Horák <dan[at]danny.cz> - 3.0-6
- apply post-3.0 fixes (#1033284)