[xscreensaver/f18] Fix segv on lament with -wireframe option (bug 849961)

Mamoru Tasaka mtasaka at fedoraproject.org
Wed Aug 22 04:34:47 UTC 2012


commit 6d34ef18ac5e248b11dcef4355922f6a437fbc3a
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date:   Wed Aug 22 13:34:42 2012 +0900

    Fix segv on lament with -wireframe option (bug 849961)
    
    - Fix improper and operator on flurry detected by llvm-clang

 xscreensaver-5.19-flurry-clangwarn.patch |   18 ++++++++++++++++++
 xscreensaver-5.19-lament-wireframe.patch |   15 +++++++++++++++
 xscreensaver.spec                        |   12 +++++++++++-
 3 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/xscreensaver-5.19-flurry-clangwarn.patch b/xscreensaver-5.19-flurry-clangwarn.patch
new file mode 100644
index 0000000..90ac670
--- /dev/null
+++ b/xscreensaver-5.19-flurry-clangwarn.patch
@@ -0,0 +1,18 @@
+--- xscreensaver-5.19/hacks/glx/flurry-smoke.c.andand	2006-02-07 21:42:12.000000000 +0900
++++ xscreensaver-5.19/hacks/glx/flurry-smoke.c	2012-08-22 13:09:34.770007165 +0900
+@@ -1023,12 +1023,14 @@
+ 					s->p[i].animFrame.i[k] = 0;
+ 				}
+ 		
+-				u0 = (s->p[i].animFrame.i[k]&&7) * 0.125f;
++				u0 = (s->p[i].animFrame.i[k]&7) * 0.125f;
+ 				v0 = (s->p[i].animFrame.i[k]>>3) * 0.125f;
+ 				u1 = u0 + 0.125f;
+ 				v1 = v0 + 0.125f;
++/*
+ 				u1 = u0 + 0.125f;
+ 				v1 = v0 + 0.125f;
++*/
+ 				cm = (1.375f - thisWidth/width);
+ 				if (s->p[i].dead.i[k] == 3)
+ 				{
diff --git a/xscreensaver-5.19-lament-wireframe.patch b/xscreensaver-5.19-lament-wireframe.patch
new file mode 100644
index 0000000..7129299
--- /dev/null
+++ b/xscreensaver-5.19-lament-wireframe.patch
@@ -0,0 +1,15 @@
+--- xscreensaver-5.19/hacks/glx/lament.c.wire	2012-06-25 06:12:16.000000000 +0900
++++ xscreensaver-5.19/hacks/glx/lament.c	2012-08-22 12:50:31.105170351 +0900
+@@ -1378,7 +1378,11 @@
+ scale_for_window(ModeInfo *mi)
+ {
+   lament_configuration *lc = &lcs[MI_SCREEN(mi)];
+-  int target_size = lc->texture->width * 1.4;
++
++  /* With -wireframe option, lc->texture is not created
++  */
++  Bool wire = MI_IS_WIREFRAME(mi);
++  int target_size = wire ? 340 : lc->texture->width * 1.4;
+   int win_size = (MI_WIDTH(mi) > MI_HEIGHT(mi) ? MI_HEIGHT(mi) : MI_WIDTH(mi));
+ 
+   /* This scale makes the box take up most of the window */
diff --git a/xscreensaver.spec b/xscreensaver.spec
index a06de1c..dbf381e 100644
--- a/xscreensaver.spec
+++ b/xscreensaver.spec
@@ -10,7 +10,7 @@
 %define split_getimage   1
 %endif
 
-%define fedora_rel    1
+%define fedora_rel    2
 
 %undefine extrarel
 
@@ -63,6 +63,10 @@ Patch30:         xscreensaver-5.11-conf264.patch
 #
 # Update Japanese po file
 Patch32:         xscreensaver-5.13-dpmsQuickoff-japo.patch
+# Fix segv on lament with -wireframe option (bug 849961)
+Patch33:         xscreensaver-5.19-lament-wireframe.patch
+# Fix improper and operator on flurry detected by llvm-clang
+Patch34:         xscreensaver-5.19-flurry-clangwarn.patch
 # driver/test-passwd tty segfaults
 Patch41:         xscreensaver-5.12-test-passwd-segv-tty.patch
 # patch to compile driver/test-xdpms
@@ -259,6 +263,8 @@ This package contains some test programs to debug XScreenSaver.
 %patch1 -p1 -b .sanitize-hacks
 %patch21 -p1 -b .nonet
 %patch32 -p1 -b .dpmsoff_japo
+%patch33 -p1 -b .wire
+%patch34 -p1 -b .andand
 %patch41 -p1 -b .test_passwd
 %patch42 -p1 -b .test_misc
 %patch43 -p1 -b .hndl_extra
@@ -812,6 +818,10 @@ exit 0
 %defattr(-,root,root,-)
 
 %changelog
+* Wed Aug 22 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1:5.19-2
+- Fix segv on lament with -wireframe option (bug 849961)
+- Fix improper and operator on flurry detected by llvm-clang
+
 * Fri Jul 27 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1:5.19-1
 - Update to 5.19
 


More information about the scm-commits mailing list