guibuilder_pel7x64builder0
5 years ago
6 changed files with 414 additions and 80 deletions
@ -0,0 +1,126 @@
@@ -0,0 +1,126 @@
|
||||
From e38ff62ebac195bedbb0eb95778d01c6af44989d Mon Sep 17 00:00:00 2001 |
||||
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org> |
||||
Date: Tue, 24 Mar 2020 13:24:47 +0900 |
||||
Subject: [PATCH] barcode / glsnake: sanitize the names of modes |
||||
|
||||
--- |
||||
hacks/barcode.c | 10 ---------- |
||||
hacks/glx/glsnake.c | 12 ++++++------ |
||||
2 files changed, 6 insertions(+), 16 deletions(-) |
||||
|
||||
diff --git a/hacks/barcode.c b/hacks/barcode.c |
||||
index 1f56013..5c3a6bd 100644 |
||||
--- a/hacks/barcode.c |
||||
+++ b/hacks/barcode.c |
||||
@@ -121,8 +121,6 @@ static const char *words[] = |
||||
"belly", |
||||
"bliss", |
||||
"bogosity", |
||||
- "boobies", |
||||
- "boobs", |
||||
"booty", |
||||
"bread", |
||||
"brogrammers", |
||||
@@ -137,7 +135,6 @@ static const char *words[] = |
||||
"chocolate", |
||||
"chupacabra", |
||||
"CLONE", |
||||
- "cock", |
||||
"congress", |
||||
"constriction", |
||||
"contrition", |
||||
@@ -178,7 +175,6 @@ static const char *words[] = |
||||
"fear", |
||||
"fever", |
||||
"filth", |
||||
- "flatulence", |
||||
"fluff", |
||||
"fnord", |
||||
"followers", |
||||
@@ -196,9 +192,7 @@ static const char *words[] = |
||||
"happiness", |
||||
"hate", |
||||
"helplessness", |
||||
- "hemorrhoid", |
||||
"hermaphrodite", |
||||
- "heroin", |
||||
"heroine", |
||||
"hope", |
||||
"hysteria", |
||||
@@ -280,7 +274,6 @@ static const char *words[] = |
||||
"punishment", |
||||
"punk rock", |
||||
"punk", |
||||
- "pussy", |
||||
"quagmire", |
||||
"quarantine", |
||||
"quartz", |
||||
@@ -289,7 +282,6 @@ static const char *words[] = |
||||
"rage", |
||||
"readout", |
||||
"reality", |
||||
- "rectum", |
||||
"reject", |
||||
"rejection", |
||||
"respect", |
||||
@@ -355,8 +347,6 @@ static const char *words[] = |
||||
"venom", |
||||
"verifiability", |
||||
"very fine people", |
||||
- "viagra", |
||||
- "vibrator", |
||||
"victim", |
||||
"vignette", |
||||
"villainy", |
||||
diff --git a/hacks/glx/glsnake.c b/hacks/glx/glsnake.c |
||||
index 8efc681..125df90 100644 |
||||
--- a/hacks/glx/glsnake.c |
||||
+++ b/hacks/glx/glsnake.c |
||||
@@ -539,7 +539,7 @@ static const struct model_s model[] = { |
||||
PIN, ZERO, RIGHT, RIGHT, ZERO, PIN, PIN, ZERO, PIN, PIN, ZERO, |
||||
RIGHT, ZERO } |
||||
}, |
||||
- { "k's turd", |
||||
+ { "caterpillar", |
||||
{ RIGHT, RIGHT, PIN, RIGHT, LEFT, RIGHT, PIN, RIGHT, LEFT, |
||||
RIGHT, PIN, RIGHT, LEFT, RIGHT, PIN, RIGHT, LEFT, RIGHT, PIN, |
||||
RIGHT, LEFT, RIGHT, PIN, ZERO } |
||||
@@ -564,22 +564,22 @@ static const struct model_s model[] = { |
||||
ZERO, PIN, ZERO, ZERO, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, ZERO, |
||||
ZERO, ZERO, ZERO } |
||||
}, |
||||
- { "kissy box", |
||||
+ { "ribbon", |
||||
{ PIN, ZERO, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, ZERO, ZERO, |
||||
ZERO, PIN, ZERO, ZERO, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, ZERO, |
||||
ZERO, PIN, ZERO } |
||||
}, |
||||
- { "erect penis", /* thanks benno */ |
||||
+ { "shuffle board", /* thanks benno */ |
||||
{ PIN, ZERO, PIN, PIN, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, PIN, |
||||
PIN, ZERO, ZERO, ZERO, RIGHT, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, |
||||
ZERO, ZERO } |
||||
}, |
||||
- { "flaccid penis", |
||||
+ { "anchor", |
||||
{ PIN, ZERO, PIN, PIN, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, PIN, |
||||
PIN, ZERO, ZERO, ZERO, RIGHT, PIN, ZERO, ZERO, ZERO, ZERO, ZERO, |
||||
ZERO, ZERO } |
||||
}, |
||||
- { "vagina", |
||||
+ { "engagement ring", |
||||
{ RIGHT, ZERO, ZERO, ZERO, RIGHT, ZERO, ZERO, PIN, ZERO, ZERO, |
||||
LEFT, ZERO, ZERO, ZERO, LEFT, ZERO, LEFT, PIN, LEFT, PIN, RIGHT, |
||||
PIN, RIGHT, ZERO } |
||||
@@ -999,7 +999,7 @@ static const struct model_s model[] = { |
||||
{ "Parrot", |
||||
{ ZERO, ZERO, ZERO, ZERO, RIGHT, RIGHT, ZERO, LEFT, PIN, RIGHT, ZERO, RIGHT, ZERO, RIGHT, ZERO, RIGHT, PIN, LEFT, ZERO, RIGHT, LEFT, ZERO, PIN, ZERO } |
||||
}, |
||||
- { "Penis", |
||||
+ { "Shuttle", |
||||
{ PIN, PIN, RIGHT, ZERO, PIN, PIN, ZERO, PIN, ZERO, ZERO, RIGHT, PIN, LEFT, ZERO, ZERO, PIN, ZERO, PIN, PIN, ZERO, LEFT, PIN, PIN, ZERO } |
||||
}, |
||||
{ "PictureComingSoon", |
||||
-- |
||||
2.25.2 |
||||
|
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
From 2ab857c449470d9de45f7b1b8114eda3d9899dc6 Mon Sep 17 00:00:00 2001 |
||||
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org> |
||||
Date: Tue, 24 Mar 2020 13:37:59 +0900 |
||||
Subject: [PATCH] Patch to compile driver/test-xdpms |
||||
|
||||
--- |
||||
driver/test-xdpms.c | 1 - |
||||
1 file changed, 1 deletion(-) |
||||
|
||||
diff --git a/driver/test-xdpms.c b/driver/test-xdpms.c |
||||
index b86aed3..1a48c3d 100644 |
||||
--- a/driver/test-xdpms.c |
||||
+++ b/driver/test-xdpms.c |
||||
@@ -29,7 +29,6 @@ |
||||
|
||||
#include <X11/Xproto.h> |
||||
#include <X11/extensions/dpms.h> |
||||
-#include <X11/extensions/dpmsstr.h> |
||||
|
||||
extern Bool DPMSQueryExtension (Display *dpy, int *event_ret, int *error_ret); |
||||
extern Bool DPMSCapable (Display *dpy); |
||||
-- |
||||
2.25.2 |
||||
|
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
From 77b8fc885e582a21c0f3f00f9120c948d4fa424b Mon Sep 17 00:00:00 2001 |
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org> |
||||
Date: Tue, 24 Mar 2020 14:26:43 +0900 |
||||
Subject: [PATCH] free_gibson: fix order of freeing memory |
||||
|
||||
gcc10 -fsanitize=address detects use-after-free on free_gibsonn: |
||||
================================================================= |
||||
==49579==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d000021c8c at pc 0x00000040da99 bp 0x7ffdb9dfea00 sp 0x7ffdb9dfe9f0 |
||||
READ of size 4 at 0x61d000021c8c thread T0 |
||||
#0 0x40da98 in free_gibson ../../../hacks/glx/gibson.c:1323 |
||||
#1 0x4256af in xlockmore_free ../../hacks/xlockmore.c:724 |
||||
#2 0x40aaeb in run_screenhack_table ../../hacks/screenhack.c:614 |
||||
#3 0x40aaeb in main ../../hacks/screenhack.c:991 |
||||
#4 0x7f6aab9b81a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) |
||||
#5 0x40c09d in _start (/home/mtasaka/rpmbuild/fedora-specific/xscreensaver/master/xscreensaver-5.44/x86_64-pc-linux-gnu/hacks/glx/gibson+0x40c09d) |
||||
|
||||
0x61d000021c8c is located 12 bytes inside of 2304-byte region [0x61d000021c80,0x61d000022580) |
||||
freed by thread T0 here: |
||||
#0 0x7f6aacc4a357 in __interceptor_free (/lib64/libasan.so.6+0xb0357) |
||||
#1 0x40d21a in free_gibson ../../../hacks/glx/gibson.c:1309 |
||||
|
||||
previously allocated by thread T0 here: |
||||
#0 0x7f6aacc4a887 in __interceptor_calloc (/lib64/libasan.so.6+0xb0887) |
||||
#1 0x41321c in init_gibson ../../../hacks/glx/gibson.c:1028 |
||||
|
||||
This patch fixes order of freeing memory. |
||||
--- |
||||
hacks/glx/gibson.c | 17 ++++++++++------- |
||||
1 file changed, 10 insertions(+), 7 deletions(-) |
||||
|
||||
diff --git a/hacks/glx/gibson.c b/hacks/glx/gibson.c |
||||
index 8f99040..05b16a7 100644 |
||||
--- a/hacks/glx/gibson.c |
||||
+++ b/hacks/glx/gibson.c |
||||
@@ -1306,7 +1306,6 @@ free_gibson (ModeInfo *mi) |
||||
if (!bp->glx_context) return; |
||||
glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); |
||||
|
||||
- if (bp->towers) free (bp->towers); |
||||
if (bp->rot) free_rotator (bp->rot); |
||||
if (bp->rot2) free_rotator (bp->rot2); |
||||
if (glIsList(bp->ground_dlist)) glDeleteLists(bp->ground_dlist, 1); |
||||
@@ -1316,15 +1315,19 @@ free_gibson (ModeInfo *mi) |
||||
if (bp->text[i].font_data) free_texture_font (bp->text[i].font_data); |
||||
if (bp->text[i].text) free (bp->text[i].text); |
||||
} |
||||
- for (i = 0; i < bp->ntowers; i++) |
||||
+ if (bp->towers) |
||||
{ |
||||
- for (j = 0; j < countof(bp->towers[i].fg_dlists); j++) |
||||
+ for (i = 0; i < bp->ntowers; i++) |
||||
{ |
||||
- if (glIsList(bp->towers[i].fg_dlists[j])) |
||||
- glDeleteLists(bp->towers[i].fg_dlists[j], 1); |
||||
- if (glIsList(bp->towers[i].bg_dlists[j])) |
||||
- glDeleteLists(bp->towers[i].bg_dlists[j], 1); |
||||
+ for (j = 0; j < countof(bp->towers[i].fg_dlists); j++) |
||||
+ { |
||||
+ if (glIsList(bp->towers[i].fg_dlists[j])) |
||||
+ glDeleteLists(bp->towers[i].fg_dlists[j], 1); |
||||
+ if (glIsList(bp->towers[i].bg_dlists[j])) |
||||
+ glDeleteLists(bp->towers[i].bg_dlists[j], 1); |
||||
+ } |
||||
} |
||||
+ free (bp->towers); |
||||
} |
||||
} |
||||
|
||||
-- |
||||
2.25.2 |
||||
|
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
From 561ba41a83a8c9f4e66eb27f87e6b37e89858dcb Mon Sep 17 00:00:00 2001 |
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org> |
||||
Date: Wed, 15 Apr 2020 23:15:40 +0900 |
||||
Subject: [PATCH] ya_rand_init: avoid signed integer overflow by with recent |
||||
pid_max value |
||||
|
||||
Recent Linux system (like Fedora) has kernel.pid_max value as 2^22 |
||||
(= 4194304), instead of old 65536 (=2^16) value. A quick reference is: |
||||
https://unix.stackexchange.com/questions/231719/why-is-the-maximum-pid-in-a-64-bit-linux-system-222/231724 |
||||
|
||||
With this value, on ya_rand_init(), multiplying the value returned by |
||||
getpid() by 1003 (which is larger than 2^9) can get larger than 2^31, |
||||
which causes signed overflow like: |
||||
|
||||
../../utils/yarandom.c:123:21: runtime error: signed integer overflow: 3774303 * 1003 cannot be represented in type 'int' |
||||
|
||||
as detected by gcc10 -sanitize=undefined. |
||||
|
||||
This patch avoids signed overflow by casting values with unsigned int. |
||||
--- |
||||
utils/yarandom.c | 4 ++-- |
||||
1 file changed, 2 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/utils/yarandom.c b/utils/yarandom.c |
||||
index f450735..0f51cb6 100644 |
||||
--- a/utils/yarandom.c |
||||
+++ b/utils/yarandom.c |
||||
@@ -118,9 +118,9 @@ ya_rand_init(unsigned int seed) |
||||
#define ROT(X,N) (((X)<<(N)) | ((X)>>((sizeof(unsigned int)*8)-(N)))) |
||||
seed = (999U * (unsigned int) tp.tv_sec); |
||||
seed = ROT (seed, 11); |
||||
- seed += (1001 * tp.tv_usec); |
||||
+ seed += (1001 * (unsigned int) tp.tv_usec); |
||||
seed = ROT (seed, 7); |
||||
- seed += (1003 * getpid()); |
||||
+ seed += (1003 * (unsigned int) getpid()); |
||||
seed = ROT (seed, 13); |
||||
} |
||||
|
||||
-- |
||||
2.25.2 |
||||
|
Loading…
Reference in new issue