From 26f6694a092547c093d18f4a90ddc83021bdcc1f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Dec 03 2013 22:42:15 +0000 Subject: Fix rhbz1037048 (-Werror=format-security FTBFS) --- diff --git a/dyninst-Werror-format-security.patch b/dyninst-Werror-format-security.patch new file mode 100644 index 0000000..f72c527 --- /dev/null +++ b/dyninst-Werror-format-security.patch @@ -0,0 +1,24 @@ +commit 67ce417eab034187f0ea952e78c547051da4b276 +Author: Josh Stone +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) { diff --git a/dyninst.spec b/dyninst.spec index 7420b7d..b4f2761 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 4%{?dist} +Release: 5%{?dist} URL: http://www.dyninst.org Version: 8.1.2 Exclusiveos: linux @@ -23,6 +23,7 @@ Source1: %{name}-docs-8.1.1.tar.gz Patch1: dyninst-rpm-build-flags.patch Patch2: dyninst-install-testsuite.patch Patch3: dyninst-pokeuser.patch +Patch4: dyninst-Werror-format-security.patch BuildRequires: libdwarf-devel >= 20111030 BuildRequires: elfutils-libelf-devel BuildRequires: boost-devel @@ -87,6 +88,7 @@ pushd dyninst %patch1 -p1 -b .buildflags %patch2 -p1 -b .testsuite %patch3 -p1 -b .pokeuser +%patch4 -p1 -d testsuite -b .format-security popd @@ -157,6 +159,9 @@ chmod 644 %{buildroot}%{_libdir}/dyninst/testsuite/* %attr(755,root,root) %{_libdir}/dyninst/testsuite/* %changelog +* Tue Dec 03 2013 Josh Stone 8.1.2-5 +- Fix rhbz1037048 (-Werror=format-security FTBFS) + * Mon Aug 05 2013 Fedora Release Engineering - 8.1.2-4 - Fix rhbz991889 (FTBFS).