[packages/xorg-app-editres] - added format patch (fixes build with -Werror=format-security, adds some bounds checking just in ca

qboosh qboosh at pld-linux.org
Tue Jan 15 19:50:38 CET 2013


commit ac325be95330c045b542464193d74b93004ce5b0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jan 15 19:50:59 2013 +0100

    - added format patch (fixes build with -Werror=format-security, adds some bounds checking just in case)

 xorg-app-editres-format.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
 xorg-app-editres.spec         |  2 ++
 2 files changed, 44 insertions(+)
---
diff --git a/xorg-app-editres.spec b/xorg-app-editres.spec
index 01e2ad2..00c966f 100644
--- a/xorg-app-editres.spec
+++ b/xorg-app-editres.spec
@@ -7,6 +7,7 @@ License:	MIT
 Group:		X11/Applications
 Source0:	http://xorg.freedesktop.org/releases/individual/app/editres-%{version}.tar.bz2
 # Source0-md5:	623322610e4040393e0ff2a69e6612cd
+Patch0:		%{name}-format.patch
 URL:		http://xorg.freedesktop.org/
 BuildRequires:	autoconf >= 2.60
 BuildRequires:	automake
@@ -38,6 +39,7 @@ Resources użytkownika.
 
 %prep
 %setup -q -n editres-%{version}
+%patch0 -p1
 
 %build
 %{__aclocal}
diff --git a/xorg-app-editres-format.patch b/xorg-app-editres-format.patch
new file mode 100644
index 0000000..2b7a281
--- /dev/null
+++ b/xorg-app-editres-format.patch
@@ -0,0 +1,42 @@
+--- editres-1.0.6/geometry.c.orig	2013-01-13 01:05:30.000000000 +0100
++++ editres-1.0.6/geometry.c	2013-01-15 19:21:30.973960183 +0100
+@@ -63,7 +63,7 @@ _FindWidget(Widget w)
+     Window win;
+     int x, y;			/* location of event in root coordinates. */
+ 
+-    sprintf(msg, res_labels[14]);
++    snprintf(msg, BUFSIZ, "%s", res_labels[14]);
+ 
+     SetMessage(global_screen_data.info_label, msg);
+ 
+@@ -103,7 +103,7 @@ DisplayChild(Event *event)
+ 		    find_event->widgets.num_widgets);
+ 
+     if (node == NULL) {
+-	sprintf(msg, res_labels[13]);
++	snprintf(msg, BUFSIZ, "%s", res_labels[13]);
+ 	SetMessage(global_screen_data.info_label, msg);
+ 	return;	
+     }
+--- editres-1.0.6/svpopup.c.orig	2013-01-13 01:05:30.000000000 +0100
++++ editres-1.0.6/svpopup.c	2013-01-15 19:24:45.332921442 +0100
+@@ -127,7 +127,7 @@ ModifySVEntry(Widget w, XEvent *event, S
+ 	old = global_screen_data.res_text;
+ 	break;
+     default:
+-	sprintf(msg, res_labels[22]);
++	snprintf(msg, BUFSIZ, "%s", res_labels[22]);
+ 	SetMessage(global_screen_data.info_label, msg);
+ 	return;
+     }
+--- editres-1.0.6/utils.c.orig	2013-01-13 01:05:30.000000000 +0100
++++ editres-1.0.6/utils.c	2013-01-15 19:25:25.208093290 +0100
+@@ -518,7 +518,7 @@ HandleGetResources(Event *event)
+ 			get_event->info[i].widgets.num_widgets);
+ 
+ 	if (node == NULL) {
+-	    sprintf(buf, res_labels[16]);
++	    snprintf(buf, BUFSIZ, "%s", res_labels[16]);
+ 	    AddString(&errors, buf); 
+ 	    continue;	
+ 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-app-editres.git/commitdiff/ac325be95330c045b542464193d74b93004ce5b0



More information about the pld-cvs-commit mailing list