Fix rhbz1037048 (-Werror=format-security FTBFS)

This commit is contained in:
Josh Stone 2013-12-03 14:42:15 -08:00
parent 9a7f0c025a
commit 26f6694a09
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,24 @@
commit 67ce417eab034187f0ea952e78c547051da4b276
Author: Josh Stone <jistone@redhat.com>
Date: Tue Dec 3 14:03:21 2013 -0800
DatabaseOutputDriver: Print raw buffer via %s
This is needed to pass -Werror=format-security, which flagged this
having passed the buffer as the format argument.
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1037048
diff --git a/src/DatabaseOutputDriver.C b/src/DatabaseOutputDriver.C
index 0a866dbea458..2769d584e9be 100644
--- a/src/DatabaseOutputDriver.C
+++ b/src/DatabaseOutputDriver.C
@@ -311,7 +311,7 @@ void DatabaseOutputDriver::writeSQLLog() {
else
buf.clear();
- fprintf(out, buf.c_str());
+ fprintf(out, "%s", buf.c_str());
delete [] buffer;
}
if (buf.rfind("RESULT:") == std::string::npos) {

View File

@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation
License: LGPLv2+ License: LGPLv2+
Name: dyninst Name: dyninst
Group: Development/Libraries Group: Development/Libraries
Release: 4%{?dist} Release: 5%{?dist}
URL: http://www.dyninst.org URL: http://www.dyninst.org
Version: 8.1.2 Version: 8.1.2
Exclusiveos: linux Exclusiveos: linux
@ -23,6 +23,7 @@ Source1: %{name}-docs-8.1.1.tar.gz
Patch1: dyninst-rpm-build-flags.patch Patch1: dyninst-rpm-build-flags.patch
Patch2: dyninst-install-testsuite.patch Patch2: dyninst-install-testsuite.patch
Patch3: dyninst-pokeuser.patch Patch3: dyninst-pokeuser.patch
Patch4: dyninst-Werror-format-security.patch
BuildRequires: libdwarf-devel >= 20111030 BuildRequires: libdwarf-devel >= 20111030
BuildRequires: elfutils-libelf-devel BuildRequires: elfutils-libelf-devel
BuildRequires: boost-devel BuildRequires: boost-devel
@ -87,6 +88,7 @@ pushd dyninst
%patch1 -p1 -b .buildflags %patch1 -p1 -b .buildflags
%patch2 -p1 -b .testsuite %patch2 -p1 -b .testsuite
%patch3 -p1 -b .pokeuser %patch3 -p1 -b .pokeuser
%patch4 -p1 -d testsuite -b .format-security
popd popd
@ -157,6 +159,9 @@ chmod 644 %{buildroot}%{_libdir}/dyninst/testsuite/*
%attr(755,root,root) %{_libdir}/dyninst/testsuite/* %attr(755,root,root) %{_libdir}/dyninst/testsuite/*
%changelog %changelog
* Tue Dec 03 2013 Josh Stone <jistone@redhat.com> 8.1.2-5
- Fix rhbz1037048 (-Werror=format-security FTBFS)
* Mon Aug 05 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.1.2-4 * Mon Aug 05 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.1.2-4
- Fix rhbz991889 (FTBFS). - Fix rhbz991889 (FTBFS).