rpms/xfig/F-8 xfig-3.2.5-zoom-crash.patch, NONE, 1.1 xfig.spec, 1.43, 1.44
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Wed Dec 12 19:37:53 UTC 2007
- Previous message (by thread): rpms/gkrellm-top/devel .cvsignore, NONE, 1.1 Makefile, NONE, 1.1 sources, NONE, 1.1
- Next message (by thread): rpms/magicor/devel .cvsignore, 1.5, 1.6 magicor.desktop, 1.2, 1.3 magicor.spec, 1.4, 1.5 sources, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jwrdegoede
Update of /cvs/extras/rpms/xfig/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25298
Modified Files:
xfig.spec
Added Files:
xfig-3.2.5-zoom-crash.patch
Log Message:
* Wed Dec 12 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 3.2.5-6
- Fix xfig crashing when zooming in a lot (bz 420411)
xfig-3.2.5-zoom-crash.patch:
--- NEW FILE xfig-3.2.5-zoom-crash.patch ---
diff -up xfig.3.2.5/w_rulers.c~ xfig.3.2.5/w_rulers.c
--- xfig.3.2.5/w_rulers.c~ 2007-12-12 20:28:30.000000000 +0100
+++ xfig.3.2.5/w_rulers.c 2007-12-12 20:28:30.000000000 +0100
@@ -1166,7 +1166,7 @@ void reset_topruler(void)
register int i,k;
register tick_info* tk;
register Pixmap p = topruler_pm;
- char number[6];
+ char number[16];
int X0,len;
int tickmod, tickskip;
@@ -1183,7 +1183,7 @@ void reset_topruler(void)
tickmod = 1;
/* see how big a label is to adjust spacing, if necessary */
- sprintf(number, "%d%s", (X0+(int)((TOPRULER_WD/zoomscale)))/tickmod, cur_fig_units);
+ snprintf(number, sizeof(number), "%d%s", (X0+(int)((TOPRULER_WD/zoomscale)))/tickmod, cur_fig_units);
len = XTextWidth(roman_font, number, strlen(number));
while (skipx < (len + 5)/zoomscale) {
skip *= 2;
@@ -1197,11 +1197,11 @@ void reset_topruler(void)
/* string */
if (i % skipx == 0) {
if ((i/10) % tickmod == 0)
- sprintf(number, "%d%s", i/tickmod, cur_fig_units);
+ snprintf(number, sizeof(number), "%d%s", i/tickmod, cur_fig_units);
else if (i % tickmod == 0)
- sprintf(number, "%d", i/tickmod);
+ snprintf(number, sizeof(number), "%d", i/tickmod);
else
- sprintf(number, precstr, (float)(1.0 * i / tickmod));
+ snprintf(number, sizeof(number), precstr, (float)(1.0 * i / tickmod));
/* get length of string to position it */
len = XTextWidth(roman_font, number, strlen(number));
/* we center on the number only, letting the minus sign hang out */
@@ -1425,7 +1425,7 @@ void reset_sideruler(void)
register int i,k;
register tick_info* tk;
register Pixmap p = sideruler_pm;
- char number[6],len;
+ char number[16],len;
int Y0;
int tickmod, tickskip;
@@ -1456,11 +1456,11 @@ void reset_sideruler(void)
/* string */
if (i % skipx == 0) {
if ((i/10) % tickmod == 0)
- sprintf(number, "%d%s", i/tickmod, cur_fig_units);
+ snprintf(number, sizeof(number), "%d%s", i/tickmod, cur_fig_units);
else if (i % tickmod == 0)
- sprintf(number, "%d", i/tickmod);
+ snprintf(number, sizeof(number), "%d", i/tickmod);
else
- sprintf(number, precstr, (float)(1.0 * i / tickmod));
+ snprintf(number, sizeof(number), precstr, (float)(1.0 * i / tickmod));
/* get length of string to position it */
len = XTextWidth(roman_font, number, strlen(number));
/* vertically centered on inch/cm mark */
Index: xfig.spec
===================================================================
RCS file: /cvs/extras/rpms/xfig/F-8/xfig.spec,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- xfig.spec 16 Nov 2007 21:03:21 -0000 1.43
+++ xfig.spec 12 Dec 2007 19:37:20 -0000 1.44
@@ -3,7 +3,7 @@
Summary: An X Window System tool for drawing basic vector graphics
Name: xfig
Version: 3.2.5
-Release: 5%{?dist}
+Release: 6%{?dist}
License: MIT
Group: Applications/Multimedia
URL: http://www.xfig.org/
@@ -21,6 +21,7 @@
Patch11: xfig-3.2.5-color-resources.patch
Patch12: xfig-3.2.5-quiet.patch
Patch13: xfig-3.2.5-urwfonts.patch
+Patch14: xfig-3.2.5-zoom-crash.patch
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
@@ -90,6 +91,7 @@
%patch11 -p1 -b .color-resources
%patch12 -p1 -b .quiet
%patch13 -p1 -b .urw
+%patch14 -p1 -b .zoom-crash
ln -nfs Doc/xfig.man xfig.man
find -type f -print0 | xargs -0 chmod -x
rm `find Doc -name '*.orig'` Doc/html/*.save Doc/html/images/sav1a0.tmp
@@ -177,6 +179,9 @@
%changelog
+* Wed Dec 12 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 3.2.5-6
+- Fix xfig crashing when zooming in a lot (bz 420411)
+
* Fri Nov 16 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 3.2.5-5
- Also compile a version against Xaw3d instead of plain Xaw, available in the
new xfig-Xaw3d package
- Previous message (by thread): rpms/gkrellm-top/devel .cvsignore, NONE, 1.1 Makefile, NONE, 1.1 sources, NONE, 1.1
- Next message (by thread): rpms/magicor/devel .cvsignore, 1.5, 1.6 magicor.desktop, 1.2, 1.3 magicor.spec, 1.4, 1.5 sources, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list