From 99f8d25b7491efe6b59346ed187c8c6cd22e12a9 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Jun 14 2010 07:39:12 +0000 Subject: - Fix crash of xjack when window is too small (bug 603587) --- diff --git a/.cvsignore b/.cvsignore index a8999bf..10bb236 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -xscreensaver-5.10.tar.gz xscreensaver-5.11.tar.gz diff --git a/sources b/sources index 6f38580..7d8450e 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -0d7205f9da8e3f1b83bcda549d73a7c4 xscreensaver-5.10.tar.gz -86cb9d36fd62bba479d1cf45b35457fe xscreensaver-5.11.tar.gz +80f981b86734ccb31c5b3b24af3930ae xscreensaver-5.11.tar.gz diff --git a/xscreensaver-5.11-usepo_again.patch b/xscreensaver-5.11-usepo_again.patch deleted file mode 100644 index 207f56b..0000000 --- a/xscreensaver-5.11-usepo_again.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- xscreensaver-5.11/Makefile.in.po 2010-04-12 20:36:05.000000000 +0900 -+++ xscreensaver-5.11/Makefile.in 2010-04-12 20:51:44.000000000 +0900 -@@ -6,8 +6,8 @@ - VPATH = @srcdir@ - - SHELL = /bin/sh --#SUBDIRS = utils driver hacks hacks/glx po --SUBDIRS = utils driver hacks hacks/glx -+SUBDIRS = utils driver hacks hacks/glx po -+#SUBDIRS = utils driver hacks hacks/glx - SUBDIRS2 = $(SUBDIRS) OSX - TARFILES = README README.hacking README.VMS INSTALL \ - configure configure.in Makefile.in config.h.in \ diff --git a/xscreensaver-5.11-xjack-with-small-window.patch b/xscreensaver-5.11-xjack-with-small-window.patch new file mode 100644 index 0000000..d0e2bca --- /dev/null +++ b/xscreensaver-5.11-xjack-with-small-window.patch @@ -0,0 +1,30 @@ +--- 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; + diff --git a/xscreensaver.spec b/xscreensaver.spec index 8fdaf8e..2792d90 100644 --- a/xscreensaver.spec +++ b/xscreensaver.spec @@ -5,9 +5,9 @@ %define modular_conf 1 -%define fedora_rel 2 +%define fedora_rel 4 -%define extrarel %{nil} +%define extrarel .respin1 %if 0%{?fedora} >= 12 %define default_text %{_datadir}/doc/HTML/readme/en_US/README-en_US.txt @@ -33,8 +33,6 @@ License: MIT Group: Amusements/Graphics URL: http://www.jwz.org/xscreensaver/ Source0: http://www.jwz.org/xscreensaver/xscreensaver-%{mainversion}%{?beta_ver}.tar.gz -# Translation being removed?? Recovering from the previous version -Source1: http://www.jwz.org/xscreensaver/xscreensaver-5.10.tar.gz %if %{modular_conf} Source10: update-xscreensaver-hacks %endif @@ -51,15 +49,17 @@ Patch1: xscreensaver-5.00b5-sanitize-hacks.patch # Change webcollage not to access to net # Also see bug 472061 Patch21: xscreensaver-5.11-webcollage-default-nonet.patch -# Reuse po again -Patch22: xscreensaver-5.11-usepo_again.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} @@ -212,14 +212,13 @@ This package contains some test programs to debug XScreenSaver. %prep -%setup -q -n %{name}-%{mainversion}%{?beta_ver} -a 1 -ln -sf xscreensaver-5.10/po po +%setup -q -n %{name}-%{mainversion}%{?beta_ver} %patch1 -p1 -b .sanitize-hacks %patch21 -p1 -b .nonet -%patch22 -p1 -b .po %patch30 -p1 -b .conf264 %patch31 -p1 -b .nowin2_sig +%patch32 -p1 -b .xjack_smallwin change_option(){ set +x @@ -691,6 +690,14 @@ exit 0 %defattr(-,root,root,-) %changelog +* Mon Jun 14 2010 Mamoru Tasaka - 1:5.11-4.respin1 +- Fix crash of xjack when window is too small (bug 603587) + +* Sat Jun 5 2010 Mamoru Tasaka - 1:5.11-3.respin1 +- Upstream seems to have released new 5.11 tarball + containing po/ directory, use that tarball + (detected by Kevin's source audit) + * Sat May 1 2010 Mamoru Tasaka - 1:5.11-2 - Fix crash when not using "pair" mode and when MappingNotify or so is received (bug 587537)