[packages/gd] - fix format string warnings - rel 11

baggins baggins at pld-linux.org
Wed Dec 12 13:18:23 CET 2012


commit 4c5e5b22cf635291c96fb12301714ff58e083c15
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Dec 12 13:18:12 2012 +0100

    - fix format string warnings
    - rel 11

 format-security.patch | 36 ++++++++++++++++++++++++++++++++++++
 gd.spec               |  4 +++-
 2 files changed, 39 insertions(+), 1 deletion(-)
---
diff --git a/gd.spec b/gd.spec
index 9875075..7cdb8d4 100644
--- a/gd.spec
+++ b/gd.spec
@@ -9,7 +9,7 @@ Summary(pl.UTF-8):	Biblioteka do tworzenia grafiki w formacie PNG, JPEG
 Summary(pt_BR.UTF-8):	Biblioteca para manipulação de imagens
 Name:		gd
 Version:	2.0.35
-Release:	10
+Release:	11
 License:	BSD-like
 Group:		Libraries
 Source0:	http://www.libgd.org/releases/%{name}-%{version}.tar.bz2
@@ -21,6 +21,7 @@ Patch3:		%{name}-2.0.35-AALineThick.patch
 Patch4:		%{name}-2.0.35-overflow.patch
 Patch5:		%{name}-2.0.35-security3.patch
 Patch6:		%{name}-loop.patch
+Patch7:		format-security.patch
 URL:		http://www.libgd.org/
 BuildRequires:	autoconf >= 2.54
 BuildRequires:	automake
@@ -153,6 +154,7 @@ para uso pelos programas que usam a libgd.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 # hack to avoid inclusion of -s in --ldflags
 %{__perl} -pi -e 's,\@LDFLAGS\@,,g' config/gdlib-config.in
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..64e358f
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,36 @@
+--- gd-2.0.35/gdtestft.c.orig	2012-12-12 13:17:03.460823690 +0100
++++ gd-2.0.35/gdtestft.c	2012-12-12 13:17:31.160822713 +0100
+@@ -74,7 +74,7 @@
+     gdImageStringFT ((gdImagePtr) NULL, &brect[0], 0, f, sz, angle, 0, 0, s);
+   if (err)
+     {
+-      fprintf (stderr, err);
++      fprintf (stderr, "%s", err);
+       return 1;
+     }
+ 
+@@ -146,21 +146,21 @@
+   err = gdImageStringFT (im, NULL, blue, f, sz, angle, x, y, s);
+   if (err)
+     {
+-      fprintf (stderr, err);
++      fprintf (stderr, "%s", err);
+       return 1;
+     }
+   /* Without antialiasing (negative color value) */
+   err = gdImageStringFT (im, NULL, -blue, f, sz, angle, sx + x, y, s);
+   if (err)
+     {
+-      fprintf (stderr, err);
++      fprintf (stderr, "%s", err);
+       return 1;
+     }
+   /* With antialiasing, and 50% alpha blending (truecolor only) */
+   err = gdImageStringFT (im, NULL, blueAlpha, f, sz, angle, sx * 2 + x, y, s);
+   if (err)
+     {
+-      fprintf (stderr, err);
++      fprintf (stderr, "%s", err);
+       return 1;
+     }
+   /* TBB: Write img to test/fttest.jpg or test/fttest.png */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gd.git/commitdiff/4c5e5b22cf635291c96fb12301714ff58e083c15



More information about the pld-cvs-commit mailing list