rpms/xscreensaver/devel xscreensaver-5.11-xjack-with-small-window.patch, NONE, 1.1 xscreensaver.spec, 1.109, 1.110

Mamoru Tasaka mtasaka at fedoraproject.org
Mon Jun 14 07:39:13 UTC 2010


Author: mtasaka

Update of /cvs/extras/rpms/xscreensaver/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv6382/devel

Modified Files:
	xscreensaver.spec 
Added Files:
	xscreensaver-5.11-xjack-with-small-window.patch 
Log Message:
* Mon Jun 14 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.11-4.respin1
- Fix crash of xjack when window is too small (bug 603587)


xscreensaver-5.11-xjack-with-small-window.patch:
 xjack.c |   21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

--- NEW FILE xscreensaver-5.11-xjack-with-small-window.patch ---
--- xscreensaver-5.11/hacks/xjack.c.debug	2008-07-31 18:52:05.000000000 +0900
+++ xscreensaver-5.11/hacks/xjack.c	2010-06-14 16:24:23.000000000 +0900
@@ -117,8 +117,25 @@
   xjack_reshape (dpy, window, st, st->xgwa.width, st->xgwa.height);
 
   st->left = 0xFF & (random() % ((st->columns / 2)+1));
-  st->right = st->left + (0xFF & (random() % (st->columns - st->left - 10)
-                                  + 10));
+
+  /* deal with small window */
+  {
+    int tmp;
+    if (st->columns <= 11)
+    {
+      fprintf(stderr, "Column width %i is too short for %s, exiting...\n",
+          st->columns, progname);
+      exit(1);
+     }
+    tmp = st->columns - st->left - 10;
+    if (tmp < 1)
+    {
+      st->left = 0;
+      tmp = 1;
+    }
+    st->right = st->left + (0xFF & (random() % tmp + 10));
+  }
+
   st->x = 0;
   st->y = 0;
 


Index: xscreensaver.spec
===================================================================
RCS file: /cvs/extras/rpms/xscreensaver/devel/xscreensaver.spec,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -p -r1.109 -r1.110
--- xscreensaver.spec	4 Jun 2010 17:04:51 -0000	1.109
+++ xscreensaver.spec	14 Jun 2010 07:39:13 -0000	1.110
@@ -5,7 +5,7 @@
 
 
 %define modular_conf  1
-%define fedora_rel    3
+%define fedora_rel    4
 
 %define extrarel      .respin1
 
@@ -50,12 +50,16 @@ Patch1:          xscreensaver-5.00b5-san
 # Also see bug 472061
 Patch21:         xscreensaver-5.11-webcollage-default-nonet.patch
 #
-## Patches to be sent to the upsteam
+## Patches already sent to the upsteam
 # Remove "AC_PROG_CC' was expanded before it was required" warning
 Patch30:         xscreensaver-5.11-conf264.patch
 # bug 587537
 # hacks crash with no window2 when MappingNotify or so is received
 Patch31:         xscreensaver-5.11-no-window2-MappingNotify-bz587537.patch
+## Patches to be sent to the upsteam
+# bug 603587
+# xjack crashes with too small window
+Patch32:         xscreensaver-5.11-xjack-with-small-window.patch
 #
 # Patches end
 Requires:        xscreensaver-base = %{epoch}:%{version}-%{release}
@@ -214,6 +218,7 @@ This package contains some test programs
 %patch21 -p1 -b .nonet
 %patch30 -p1 -b .conf264
 %patch31 -p1 -b .nowin2_sig
+%patch32 -p1 -b .xjack_smallwin
 
 change_option(){
    set +x
@@ -685,6 +690,9 @@ exit 0
 %defattr(-,root,root,-)
 
 %changelog
+* Mon Jun 14 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.11-4.respin1
+- Fix crash of xjack when window is too small (bug 603587)
+
 * Sat Jun  5 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.11-3.respin1
 - Upstream seems to have released new 5.11 tarball
   containing po/ directory, use that tarball



More information about the scm-commits mailing list