media-libs/plotutils: Add debian/redhat patch for format-security, bug 556568
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Thu, 16 Feb 2017 00:12:05 +0000 (01:12 +0100)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Thu, 16 Feb 2017 00:13:43 +0000 (01:13 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

media-libs/plotutils/files/plotutils-2.6-format-security.patch [new file with mode: 0644]
media-libs/plotutils/plotutils-2.6-r1.ebuild

diff --git a/media-libs/plotutils/files/plotutils-2.6-format-security.patch b/media-libs/plotutils/files/plotutils-2.6-format-security.patch
new file mode 100644 (file)
index 0000000..c1cbecf
--- /dev/null
@@ -0,0 +1,18 @@
+Description: Fix build error with -Werror=format-security.
+Forwarded: https://lists.gnu.org/archive/html/bug-plotutils/2016-01/msg00000.html 
+Author: Stanislav Ochotnicky <sochotnicky@redhat.com>
+Origin: http://pkgs.fedoraproject.org/cgit/plotutils.git
+
+diff --git a/pic2plot/gram.yy b/pic2plot/gram.yy
+index d11320b..1bcce46 100644
+--- a/pic2plot/gram.yy
++++ b/pic2plot/gram.yy
+@@ -1833,7 +1833,7 @@ do_sprintf(const char *form, const double *v, int nv)
+           {
+             one_format += *form++;
+             one_format += '\0';
+-            sprintf(sprintf_buf, one_format.contents());
++            sprintf(sprintf_buf, "%s", one_format.contents());
+           }
+         else 
+           {
index 13eeaf32b8d08f8b6d6e12c6499ea3dfa1be31b5..3153d134c0a0d614279760c2e4d534edbafdc6fe 100644 (file)
@@ -35,7 +35,8 @@ src_prepare() {
                "${FILESDIR}"/${PN}-2.5.1-rangecheck.patch \
                "${FILESDIR}"/${P}-makefile.patch \
                "${FILESDIR}"/${P}-libpng-1.5.patch \
-               "${FILESDIR}"/${P}-libxmi.patch
+               "${FILESDIR}"/${P}-libxmi.patch \
+               "${FILESDIR}"/${P}-format-security.patch
        eautoreconf
        elibtoolize
 }