1 |
dberkholz 08/05/08 08:20:44 |
2 |
|
3 |
Added: |
4 |
0001-Bug-13308-Verify-and-reject-obviously-broken-modes.patch |
5 |
0002-bgPixel-unsigned-long-is-64-bit-on-x86_64-so-1.patch |
6 |
0003-Xprint-Clean-up-generated-files.patch |
7 |
0004-Config-D-Bus-Don-t-leak-timers.patch |
8 |
0005-Config-HAL-Don-t-leak-options-on-failure-to-add-de.patch |
9 |
0006-OS-Don-t-leak-connection-translation-table-on-regen.patch |
10 |
0007-KDrive-Xephyr-Don-t-leak-screen-damage-structure.patch |
11 |
0008-Input-Don-t-reinit-devices.patch |
12 |
0009-include-never-overwrite-realInputProc-with-enqueueI.patch |
13 |
0010-OS-IO-Zero-out-client-buffers.patch |
14 |
0011-XKB-XkbCopyKeymap-Don-t-leak-all-the-sections.patch |
15 |
0012-Xephyr-One-time-keyboard-leak-fix.patch |
16 |
0013-Fix-for-CVE-2007-5760-XFree86-Misc-extension-out-o.patch |
17 |
0014-Fix-for-CVE-2007-6428-TOG-cup-extension-memory-cor.patch |
18 |
0015-Fix-for-CVE-2007-6427-Xinput-extension-memory-corr.patch |
19 |
0016-Fix-for-CVE-2007-6429-MIT-SHM-and-EVI-extensions-i.patch |
20 |
0017-Fix-for-CVE-2008-0006-PCF-Font-parser-buffer-overf.patch |
21 |
0018-Fix-for-CVE-2007-5958-File-existence-disclosure.patch |
22 |
0019-CVE-2007-6429-Don-t-spuriously-reject-8bpp-shm-pix.patch |
23 |
0020-dix-set-the-correct-number-of-valuators-in-valuator.patch |
24 |
0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch |
25 |
0022-security-Fix-for-Bug-14480-untrusted-access-broke.patch |
26 |
0023-Resize-composite-overlay-window-when-the-root-window.patch |
27 |
0024-Fix-rotation-for-multi-monitor-situation.patch |
28 |
0025-Don-t-break-grab-and-focus-state-for-a-window-when-r.patch |
29 |
0026-CVE-2007-6429-Always-test-for-size-offset-wrapping.patch |
30 |
0027-Fix-context-sharing-between-direct-indirect-contexts.patch |
31 |
0028-Add-some-more-support-for-DragonFly.-From-Joerg-Sonn.patch |
32 |
0029-configure.ac-DragonFly-BSD-support.patch |
33 |
0030-Fixed-configure.ac-for-autoconf-2.62.patch |
34 |
0031-EXA-Fix-off-by-one-in-polyline-drawing.patch |
35 |
0032-XKB-Fix-processInputProc-wrapping.patch |
36 |
0033-xfree86-fix-AlwaysCore-handling.-Bug-14256.patch |
37 |
0034-Ignore-not-just-block-SIGALRM-around-Popen-Pcl.patch |
38 |
0035-Fix-build-on-FreeBSD-after-Popen-changes.patch |
39 |
0036-So-like-checking-return-codes-of-system-calls-sig.patch |
40 |
0037-Check-for-sys-sdt.h-as-well-when-determining-to-en.patch |
41 |
0038-dix-Always-add-valuator-information-if-present.patch |
42 |
0039-Bug-10324-dix-Allow-arbitrary-value-ranges-in-Ge.patch |
43 |
0040-Bug-10324-dix-Add-scaling-of-X-and-Y-on-the-repo.patch |
44 |
0041-dix-Skip-call-to-clipAxis-for-relative-core-events.patch |
45 |
0042-dix-Move-motion-history-update-until-after-screen-c.patch |
46 |
0043-XKB-Actually-explain-keymap-failures.patch |
47 |
Log: |
48 |
Add an unkeyworded new revision with tons of fixes from upstream's 1.4 branch. More patches may be coming soon, and rekeywording is pending on that. I expect this to be a candidate for stable. |
49 |
(Portage version: 2.1.5_rc7) |
50 |
(Signed Manifest commit) |
51 |
|
52 |
Revision Changes Path |
53 |
1.1 x11-base/xorg-server/files/1.4.0.90/0001-Bug-13308-Verify-and-reject-obviously-broken-modes.patch |
54 |
|
55 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0001-Bug-13308-Verify-and-reject-obviously-broken-modes.patch?rev=1.1&view=markup |
56 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0001-Bug-13308-Verify-and-reject-obviously-broken-modes.patch?rev=1.1&content-type=text/plain |
57 |
|
58 |
Index: 0001-Bug-13308-Verify-and-reject-obviously-broken-modes.patch |
59 |
=================================================================== |
60 |
From f4bcb53e86bb103b6bcf8a3a170a36137c34d272 Mon Sep 17 00:00:00 2001 |
61 |
From: Hong Liu <hong.liu@×××××.com> |
62 |
Date: Wed, 5 Dec 2007 17:48:28 +0100 |
63 |
Subject: [PATCH] Bug 13308: Verify and reject obviously broken modes. |
64 |
(cherry picked from commit c6cfcd408df3e44d0094946c0a7d2fa944b4d2d1) |
65 |
|
66 |
--- |
67 |
hw/xfree86/modes/xf86EdidModes.c | 6 ++++++ |
68 |
1 files changed, 6 insertions(+), 0 deletions(-) |
69 |
|
70 |
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c |
71 |
index 8b5e69d..e2ae665 100644 |
72 |
--- a/hw/xfree86/modes/xf86EdidModes.c |
73 |
+++ b/hw/xfree86/modes/xf86EdidModes.c |
74 |
@@ -239,6 +239,12 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, |
75 |
Mode->VSyncEnd = Mode->VSyncStart + timing->v_sync_width; |
76 |
Mode->VTotal = timing->v_active + timing->v_blanking; |
77 |
|
78 |
+ /* perform basic check on the detail timing */ |
79 |
+ if (Mode->HSyncEnd > Mode->HTotal || Mode->VSyncEnd > Mode->VTotal) { |
80 |
+ xfree(Mode); |
81 |
+ return NULL; |
82 |
+ } |
83 |
+ |
84 |
xf86SetModeDefaultName(Mode); |
85 |
|
86 |
/* We ignore h/v_size and h/v_border for now. */ |
87 |
-- |
88 |
1.5.5.1 |
89 |
|
90 |
|
91 |
|
92 |
|
93 |
1.1 x11-base/xorg-server/files/1.4.0.90/0002-bgPixel-unsigned-long-is-64-bit-on-x86_64-so-1.patch |
94 |
|
95 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0002-bgPixel-unsigned-long-is-64-bit-on-x86_64-so-1.patch?rev=1.1&view=markup |
96 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0002-bgPixel-unsigned-long-is-64-bit-on-x86_64-so-1.patch?rev=1.1&content-type=text/plain |
97 |
|
98 |
Index: 0002-bgPixel-unsigned-long-is-64-bit-on-x86_64-so-1.patch |
99 |
=================================================================== |
100 |
From 41f735fbe02f59bc7bcca335c6e743c72c2fc44c Mon Sep 17 00:00:00 2001 |
101 |
From: Hong Liu <hong.liu@×××××.com> |
102 |
Date: Tue, 4 Sep 2007 08:46:46 +0100 |
103 |
Subject: [PATCH] bgPixel (unsigned long) is 64-bit on x86_64, so -1 != 0xffffffff |
104 |
|
105 |
This patch should fix bug 8080. |
106 |
(cherry picked from commit 9adea807038b64292403ede982075fe1dcfd4c9a) |
107 |
--- |
108 |
hw/xfree86/xaa/xaaGC.c | 9 +++++---- |
109 |
1 files changed, 5 insertions(+), 4 deletions(-) |
110 |
|
111 |
diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c |
112 |
index f3434c9..b3dc83a 100644 |
113 |
--- a/hw/xfree86/xaa/xaaGC.c |
114 |
+++ b/hw/xfree86/xaa/xaaGC.c |
115 |
@@ -80,10 +80,11 @@ XAAValidateGC( |
116 |
} |
117 |
|
118 |
if(pGC->depth != 32) { |
119 |
- if(pGC->bgPixel == -1) /* -1 is reserved for transparency */ |
120 |
- pGC->bgPixel = 0x7fffffff; |
121 |
- if(pGC->fgPixel == -1) /* -1 is reserved for transparency */ |
122 |
- pGC->fgPixel = 0x7fffffff; |
123 |
+ /* 0xffffffff is reserved for transparency */ |
124 |
+ if(pGC->bgPixel == 0xffffffff) |
125 |
+ pGC->bgPixel = 0x7fffffff; |
126 |
+ if(pGC->fgPixel == 0xffffffff) |
127 |
+ pGC->fgPixel = 0x7fffffff; |
128 |
} |
129 |
|
130 |
if((pDraw->type == DRAWABLE_PIXMAP) && !IS_OFFSCREEN_PIXMAP(pDraw)){ |
131 |
-- |
132 |
1.5.5.1 |
133 |
|
134 |
|
135 |
|
136 |
|
137 |
1.1 x11-base/xorg-server/files/1.4.0.90/0003-Xprint-Clean-up-generated-files.patch |
138 |
|
139 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0003-Xprint-Clean-up-generated-files.patch?rev=1.1&view=markup |
140 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0003-Xprint-Clean-up-generated-files.patch?rev=1.1&content-type=text/plain |
141 |
|
142 |
Index: 0003-Xprint-Clean-up-generated-files.patch |
143 |
=================================================================== |
144 |
From d988da6eee8422774dff364050bf431b843a714a Mon Sep 17 00:00:00 2001 |
145 |
From: Arkadiusz Miskiewicz <arekm@×××××.pl> |
146 |
Date: Thu, 13 Dec 2007 00:09:08 +0200 |
147 |
Subject: [PATCH] Xprint: Clean up generated files |
148 |
|
149 |
Remember to clean generated wrapper files. |
150 |
(cherry picked from commit 977fcdea8198906936a64b8117e6a6d027c617e3) |
151 |
--- |
152 |
hw/xprint/Makefile.am | 2 ++ |
153 |
1 files changed, 2 insertions(+), 0 deletions(-) |
154 |
|
155 |
diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am |
156 |
index dc8764a..f834966 100644 |
157 |
--- a/hw/xprint/Makefile.am |
158 |
+++ b/hw/xprint/Makefile.am |
159 |
@@ -41,3 +41,5 @@ Xprt_SOURCES = \ |
160 |
$(top_srcdir)/fb/fbcmap_mi.c |
161 |
|
162 |
EXTRA_DIST = ValTree.c |
163 |
+ |
164 |
+CLEANFILES = miinitext-wrapper.c dpmsstubs-wrapper.c |
165 |
-- |
166 |
1.5.5.1 |
167 |
|
168 |
|
169 |
|
170 |
|
171 |
1.1 x11-base/xorg-server/files/1.4.0.90/0004-Config-D-Bus-Don-t-leak-timers.patch |
172 |
|
173 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0004-Config-D-Bus-Don-t-leak-timers.patch?rev=1.1&view=markup |
174 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0004-Config-D-Bus-Don-t-leak-timers.patch?rev=1.1&content-type=text/plain |
175 |
|
176 |
Index: 0004-Config-D-Bus-Don-t-leak-timers.patch |
177 |
=================================================================== |
178 |
From 81c5950d0af8d5859f850b98c98a532784e9a757 Mon Sep 17 00:00:00 2001 |
179 |
From: Daniel Stone <daniel@×××××××××.org> |
180 |
Date: Fri, 28 Dec 2007 15:47:21 +0200 |
181 |
Subject: [PATCH] Config: D-Bus: Don't leak timers |
182 |
|
183 |
TimerCancel doesn't free the timer: you need TimerFree for that. |
184 |
(cherry picked from commit 25deaa7e6b29b3913b35efa39b9c8b25de5e6d95) |
185 |
--- |
186 |
config/dbus-core.c | 5 ++++- |
187 |
1 files changed, 4 insertions(+), 1 deletions(-) |
188 |
|
189 |
diff --git a/config/dbus-core.c b/config/dbus-core.c |
190 |
index eab72a5..9cf1530 100644 |
191 |
--- a/config/dbus-core.c |
192 |
+++ b/config/dbus-core.c |
193 |
@@ -76,7 +76,7 @@ teardown(void) |
194 |
struct config_dbus_core_hook *hook; |
195 |
|
196 |
if (bus_info.timer) { |
197 |
- TimerCancel(bus_info.timer); |
198 |
+ TimerFree(bus_info.timer); |
199 |
bus_info.timer = NULL; |
200 |
} |
201 |
|
202 |
@@ -116,6 +116,8 @@ message_filter(DBusConnection *connection, DBusMessage *message, void *data) |
203 |
bus_info.connection = NULL; |
204 |
teardown(); |
205 |
|
206 |
+ if (bus_info.timer) |
207 |
+ TimerFree(bus_info.timer); |
208 |
bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); |
209 |
|
210 |
return DBUS_HANDLER_RESULT_HANDLED; |
211 |
@@ -186,6 +188,7 @@ static CARD32 |
212 |
reconnect_timer(OsTimerPtr timer, CARD32 time, pointer arg) |
213 |
{ |
214 |
if (connect_to_bus()) { |
215 |
+ TimerFree(bus_info.timer); |
216 |
bus_info.timer = NULL; |
217 |
return 0; |
218 |
} |
219 |
-- |
220 |
1.5.5.1 |
221 |
|
222 |
|
223 |
|
224 |
|
225 |
1.1 x11-base/xorg-server/files/1.4.0.90/0005-Config-HAL-Don-t-leak-options-on-failure-to-add-de.patch |
226 |
|
227 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0005-Config-HAL-Don-t-leak-options-on-failure-to-add-de.patch?rev=1.1&view=markup |
228 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0005-Config-HAL-Don-t-leak-options-on-failure-to-add-de.patch?rev=1.1&content-type=text/plain |
229 |
|
230 |
Index: 0005-Config-HAL-Don-t-leak-options-on-failure-to-add-de.patch |
231 |
=================================================================== |
232 |
From 30fc8053a5e734c3b70156bdae94fd7d5d7865a5 Mon Sep 17 00:00:00 2001 |
233 |
From: Daniel Stone <daniel@×××××××××.org> |
234 |
Date: Fri, 28 Dec 2007 15:47:57 +0200 |
235 |
Subject: [PATCH] Config: HAL: Don't leak options on failure to add device |
236 |
|
237 |
This showed up in Xephyr in particular, which denies new device requests. |
238 |
(cherry picked from commit 2bb199056edf6c63cf978d1a8ad49a57ce1938f3) |
239 |
--- |
240 |
config/hal.c | 11 ++++++++++- |
241 |
1 files changed, 10 insertions(+), 1 deletions(-) |
242 |
|
243 |
diff --git a/config/hal.c b/config/hal.c |
244 |
index 4427deb..16f16ec 100644 |
245 |
--- a/config/hal.c |
246 |
+++ b/config/hal.c |
247 |
@@ -92,6 +92,8 @@ add_option(InputOption **options, const char *key, const char *value) |
248 |
for (; *options; options = &(*options)->next) |
249 |
; |
250 |
*options = xcalloc(sizeof(**options), 1); |
251 |
+ if (!*options) /* Yeesh. */ |
252 |
+ return; |
253 |
(*options)->key = xstrdup(key); |
254 |
(*options)->value = xstrdup(value); |
255 |
(*options)->next = NULL; |
256 |
@@ -156,7 +158,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) |
257 |
char *path = NULL, *driver = NULL, *name = NULL, *xkb_rules = NULL; |
258 |
char *xkb_model = NULL, *xkb_layout = NULL, *xkb_variant = NULL; |
259 |
char *xkb_options = NULL, *config_info = NULL; |
260 |
- InputOption *options = NULL; |
261 |
+ InputOption *options = NULL, *tmpo = NULL; |
262 |
DeviceIntPtr dev; |
263 |
DBusError error; |
264 |
int type = TYPE_NONE; |
265 |
@@ -232,6 +234,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) |
266 |
|
267 |
if (NewInputDeviceRequest(options, &dev) != Success) { |
268 |
DebugF("[config/hal] NewInputDeviceRequest failed\n"); |
269 |
+ dev = NULL; |
270 |
goto unwind; |
271 |
} |
272 |
|
273 |
@@ -255,6 +258,12 @@ unwind: |
274 |
xfree(xkb_options); |
275 |
if (config_info) |
276 |
xfree(config_info); |
277 |
+ while (!dev && (tmpo = options)) { |
278 |
+ options = tmpo->next; |
279 |
+ xfree(tmpo->key); |
280 |
+ xfree(tmpo->value); |
281 |
+ xfree(tmpo); |
282 |
+ } |
283 |
|
284 |
out_error: |
285 |
dbus_error_free(&error); |
286 |
-- |
287 |
1.5.5.1 |
288 |
|
289 |
|
290 |
|
291 |
|
292 |
1.1 x11-base/xorg-server/files/1.4.0.90/0006-OS-Don-t-leak-connection-translation-table-on-regen.patch |
293 |
|
294 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0006-OS-Don-t-leak-connection-translation-table-on-regen.patch?rev=1.1&view=markup |
295 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0006-OS-Don-t-leak-connection-translation-table-on-regen.patch?rev=1.1&content-type=text/plain |
296 |
|
297 |
Index: 0006-OS-Don-t-leak-connection-translation-table-on-regen.patch |
298 |
=================================================================== |
299 |
From 38d8cfaaff0ae6273d9e921aae08b2706355f0d2 Mon Sep 17 00:00:00 2001 |
300 |
From: Daniel Stone <daniel@×××××××××.org> |
301 |
Date: Fri, 28 Dec 2007 15:48:25 +0200 |
302 |
Subject: [PATCH] OS: Don't leak connection translation table on regeneration |
303 |
(cherry picked from commit e868e0bc0d2318e62707d3ae68532b0029959154) |
304 |
|
305 |
--- |
306 |
os/connection.c | 3 ++- |
307 |
1 files changed, 2 insertions(+), 1 deletions(-) |
308 |
|
309 |
diff --git a/os/connection.c b/os/connection.c |
310 |
index b944593..d1ba845 100644 |
311 |
--- a/os/connection.c |
312 |
+++ b/os/connection.c |
313 |
@@ -353,7 +353,8 @@ InitConnectionLimits(void) |
314 |
#endif |
315 |
|
316 |
#if !defined(WIN32) |
317 |
- ConnectionTranslation = (int *)xnfalloc(sizeof(int)*(lastfdesc + 1)); |
318 |
+ if (!ConnectionTranslation) |
319 |
+ ConnectionTranslation = (int *)xnfalloc(sizeof(int)*(lastfdesc + 1)); |
320 |
#else |
321 |
InitConnectionTranslation(); |
322 |
#endif |
323 |
-- |
324 |
1.5.5.1 |
325 |
|
326 |
|
327 |
|
328 |
|
329 |
1.1 x11-base/xorg-server/files/1.4.0.90/0007-KDrive-Xephyr-Don-t-leak-screen-damage-structure.patch |
330 |
|
331 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0007-KDrive-Xephyr-Don-t-leak-screen-damage-structure.patch?rev=1.1&view=markup |
332 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0007-KDrive-Xephyr-Don-t-leak-screen-damage-structure.patch?rev=1.1&content-type=text/plain |
333 |
|
334 |
Index: 0007-KDrive-Xephyr-Don-t-leak-screen-damage-structure.patch |
335 |
=================================================================== |
336 |
From a304fc1d4a7062f65161ef8748fd358639ec73de Mon Sep 17 00:00:00 2001 |
337 |
From: Daniel Stone <daniel@×××××××××.org> |
338 |
Date: Fri, 28 Dec 2007 15:48:57 +0200 |
339 |
Subject: [PATCH] KDrive: Xephyr: Don't leak screen damage structure |
340 |
(cherry picked from commit 0b03d97a244540824c922c300adbc3d3ae4855d5) |
341 |
|
342 |
--- |
343 |
hw/kdrive/ephyr/ephyr.c | 1 + |
344 |
1 files changed, 1 insertions(+), 0 deletions(-) |
345 |
|
346 |
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c |
347 |
index e8001df..27165a5 100644 |
348 |
--- a/hw/kdrive/ephyr/ephyr.c |
349 |
+++ b/hw/kdrive/ephyr/ephyr.c |
350 |
@@ -394,6 +394,7 @@ ephyrUnsetInternalDamage (ScreenPtr pScreen) |
351 |
|
352 |
pPixmap = (*pScreen->GetScreenPixmap) (pScreen); |
353 |
DamageUnregister (&pPixmap->drawable, scrpriv->pDamage); |
354 |
+ DamageDestroy (scrpriv->pDamage); |
355 |
|
356 |
RemoveBlockAndWakeupHandlers (ephyrInternalDamageBlockHandler, |
357 |
ephyrInternalDamageWakeupHandler, |
358 |
-- |
359 |
1.5.5.1 |
360 |
|
361 |
|
362 |
|
363 |
|
364 |
1.1 x11-base/xorg-server/files/1.4.0.90/0008-Input-Don-t-reinit-devices.patch |
365 |
|
366 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0008-Input-Don-t-reinit-devices.patch?rev=1.1&view=markup |
367 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0008-Input-Don-t-reinit-devices.patch?rev=1.1&content-type=text/plain |
368 |
|
369 |
Index: 0008-Input-Don-t-reinit-devices.patch |
370 |
=================================================================== |
371 |
From 102c012c206cbb3bbf0fa5b0c8f0ce2ce9bba72a Mon Sep 17 00:00:00 2001 |
372 |
From: Daniel Stone <daniel@×××××××××.org> |
373 |
Date: Fri, 28 Dec 2007 15:49:50 +0200 |
374 |
Subject: [PATCH] Input: Don't reinit devices |
375 |
|
376 |
If a device is already initialised (i.e. the virtual core devices) during |
377 |
IASD, don't init them again. This fixes a leak. |
378 |
(cherry picked from commit 1f6015c8fe62c28cfaa82cc855b5b9c28fd34607) |
379 |
--- |
380 |
dix/devices.c | 3 ++- |
381 |
1 files changed, 2 insertions(+), 1 deletions(-) |
382 |
|
383 |
diff --git a/dix/devices.c b/dix/devices.c |
384 |
index 287d730..f6f3c8e 100644 |
385 |
--- a/dix/devices.c |
386 |
+++ b/dix/devices.c |
387 |
@@ -473,7 +473,8 @@ InitAndStartDevices(void) |
388 |
|
389 |
for (dev = inputInfo.off_devices; dev; dev = dev->next) { |
390 |
DebugF("(dix) initialising device %d\n", dev->id); |
391 |
- ActivateDevice(dev); |
392 |
+ if (!dev->inited) |
393 |
+ ActivateDevice(dev); |
394 |
} |
395 |
for (dev = inputInfo.off_devices; dev; dev = next) |
396 |
{ |
397 |
-- |
398 |
1.5.5.1 |
399 |
|
400 |
|
401 |
|
402 |
|
403 |
1.1 x11-base/xorg-server/files/1.4.0.90/0009-include-never-overwrite-realInputProc-with-enqueueI.patch |
404 |
|
405 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0009-include-never-overwrite-realInputProc-with-enqueueI.patch?rev=1.1&view=markup |
406 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0009-include-never-overwrite-realInputProc-with-enqueueI.patch?rev=1.1&content-type=text/plain |
407 |
|
408 |
Index: 0009-include-never-overwrite-realInputProc-with-enqueueI.patch |
409 |
=================================================================== |
410 |
From 60144ac814ee26e151186f7c93cb1a273468d497 Mon Sep 17 00:00:00 2001 |
411 |
From: Peter Hutterer <peter@××××××××××××.au> |
412 |
Date: Wed, 19 Dec 2007 16:20:36 +1030 |
413 |
Subject: [PATCH] include: never overwrite realInputProc with enqueueInputProc. Bug #13511 |
414 |
|
415 |
In some cases (triggered by a key repeat during a sync grab) XKB unwrapping |
416 |
can overwrite the device's realInputProc with the enqueueInputProc. When the |
417 |
grab is released and the events are replayed, we end up in an infinite loop. |
418 |
Each event is replayed and in replaying pushed to the end of the queue again. |
419 |
|
420 |
This fix is a hack only. It ensures that the realInputProc is never |
421 |
overwritten with the enqueueInputProc. |
422 |
|
423 |
This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511) |
424 |
(cherry picked from commit eace88989c3b65d5c20e9f37ea9b23c7c8e19335) |
425 |
(cherry picked from commit 50e80c39870adfdc84fdbc00dddf1362117ad443) |
426 |
--- |
427 |
include/xkbsrv.h | 3 ++- |
428 |
1 files changed, 2 insertions(+), 1 deletions(-) |
429 |
|
430 |
diff --git a/include/xkbsrv.h b/include/xkbsrv.h |
431 |
index 167dbec..9174eb6 100644 |
432 |
--- a/include/xkbsrv.h |
433 |
+++ b/include/xkbsrv.h |
434 |
@@ -258,7 +258,8 @@ typedef struct |
435 |
device->public.processInputProc = proc; \ |
436 |
oldprocs->processInputProc = \ |
437 |
oldprocs->realInputProc = device->public.realInputProc; \ |
438 |
- device->public.realInputProc = proc; \ |
439 |
+ if (proc != device->public.enqueueInputProc) \ |
440 |
+ device->public.realInputProc = proc; \ |
441 |
oldprocs->unwrapProc = device->unwrapProc; \ |
442 |
device->unwrapProc = unwrapproc; |
443 |
|
444 |
-- |
445 |
1.5.5.1 |
446 |
|
447 |
|
448 |
|
449 |
|
450 |
1.1 x11-base/xorg-server/files/1.4.0.90/0010-OS-IO-Zero-out-client-buffers.patch |
451 |
|
452 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0010-OS-IO-Zero-out-client-buffers.patch?rev=1.1&view=markup |
453 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0010-OS-IO-Zero-out-client-buffers.patch?rev=1.1&content-type=text/plain |
454 |
|
455 |
Index: 0010-OS-IO-Zero-out-client-buffers.patch |
456 |
=================================================================== |
457 |
From 02e805f0ff4b6af551372ba5fc5fb369c8834d1d Mon Sep 17 00:00:00 2001 |
458 |
From: Daniel Stone <daniel@×××××××××.org> |
459 |
Date: Sat, 5 Jan 2008 10:38:16 +0200 |
460 |
Subject: [PATCH] OS: IO: Zero out client buffers |
461 |
|
462 |
For alignment reasons, we can write out uninitialised bytes, so allocate |
463 |
the whole thing with xcalloc. |
464 |
(cherry picked from commit b99a43dfe97c1813e1c61f298b1c83c5d5ca88a2) |
465 |
--- |
466 |
os/io.c | 2 +- |
467 |
1 files changed, 1 insertions(+), 1 deletions(-) |
468 |
|
469 |
diff --git a/os/io.c b/os/io.c |
470 |
index 9de75ee..a8b84fb 100644 |
471 |
--- a/os/io.c |
472 |
+++ b/os/io.c |
473 |
@@ -1197,7 +1197,7 @@ AllocateOutputBuffer(void) |
474 |
oco = (ConnectionOutputPtr)xalloc(sizeof(ConnectionOutput)); |
475 |
if (!oco) |
476 |
return (ConnectionOutputPtr)NULL; |
477 |
- oco->buf = (unsigned char *) xalloc(BUFSIZE); |
478 |
+ oco->buf = (unsigned char *) xcalloc(1, BUFSIZE); |
479 |
if (!oco->buf) |
480 |
{ |
481 |
xfree(oco); |
482 |
-- |
483 |
1.5.5.1 |
484 |
|
485 |
|
486 |
|
487 |
|
488 |
1.1 x11-base/xorg-server/files/1.4.0.90/0011-XKB-XkbCopyKeymap-Don-t-leak-all-the-sections.patch |
489 |
|
490 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0011-XKB-XkbCopyKeymap-Don-t-leak-all-the-sections.patch?rev=1.1&view=markup |
491 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0011-XKB-XkbCopyKeymap-Don-t-leak-all-the-sections.patch?rev=1.1&content-type=text/plain |
492 |
|
493 |
Index: 0011-XKB-XkbCopyKeymap-Don-t-leak-all-the-sections.patch |
494 |
=================================================================== |
495 |
From 8a3acd3ec41b887b4aeaa0b2932265522c1e2836 Mon Sep 17 00:00:00 2001 |
496 |
From: Daniel Stone <daniel@×××××××××.org> |
497 |
Date: Sat, 5 Jan 2008 10:43:53 +0200 |
498 |
Subject: [PATCH] XKB: XkbCopyKeymap: Don't leak all the sections |
499 |
|
500 |
Previously, we'd just keep num_sections at 0, which would break the |
501 |
geometry and lead us to leak sections. Don't do that. |
502 |
(cherry picked from commit 0137b0394a248f694448a7d97c9a1a3efcf24e81) |
503 |
--- |
504 |
xkb/xkbUtils.c | 1 + |
505 |
1 files changed, 1 insertions(+), 0 deletions(-) |
506 |
|
507 |
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c |
508 |
index c7f9a26..e90df0d 100644 |
509 |
--- a/xkb/xkbUtils.c |
510 |
+++ b/xkb/xkbUtils.c |
511 |
@@ -1770,6 +1770,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) |
512 |
if (!tmp) |
513 |
return FALSE; |
514 |
dst->geom->sections = tmp; |
515 |
+ dst->geom->num_sections = src->geom->num_sections; |
516 |
|
517 |
for (i = 0, |
518 |
ssection = src->geom->sections, |
519 |
-- |
520 |
1.5.5.1 |
521 |
|
522 |
|
523 |
|
524 |
|
525 |
1.1 x11-base/xorg-server/files/1.4.0.90/0012-Xephyr-One-time-keyboard-leak-fix.patch |
526 |
|
527 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0012-Xephyr-One-time-keyboard-leak-fix.patch?rev=1.1&view=markup |
528 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0012-Xephyr-One-time-keyboard-leak-fix.patch?rev=1.1&content-type=text/plain |
529 |
|
530 |
Index: 0012-Xephyr-One-time-keyboard-leak-fix.patch |
531 |
=================================================================== |
532 |
From 636aa9e7be2822a0148067a11499ad48fe682cd9 Mon Sep 17 00:00:00 2001 |
533 |
From: Daniel Stone <daniel@×××××××××.org> |
534 |
Date: Sat, 5 Jan 2008 10:47:39 +0200 |
535 |
Subject: [PATCH] Xephyr: One-time keyboard leak fix |
536 |
|
537 |
Don't leak the originally-allocated keysym map. |
538 |
(cherry picked from commit e85130c85f727466fc27be1cfa46c88b257499fb) |
539 |
--- |
540 |
hw/kdrive/ephyr/ephyr.c | 1 + |
541 |
1 files changed, 1 insertions(+), 0 deletions(-) |
542 |
|
543 |
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c |
544 |
index 27165a5..86e8f1f 100644 |
545 |
--- a/hw/kdrive/ephyr/ephyr.c |
546 |
+++ b/hw/kdrive/ephyr/ephyr.c |
547 |
@@ -915,6 +915,7 @@ EphyrKeyboardInit (KdKeyboardInfo *ki) |
548 |
ki->minScanCode = ki->keySyms.minKeyCode; |
549 |
ki->maxScanCode = ki->keySyms.maxKeyCode; |
550 |
ki->keySyms.mapWidth = ephyrKeySyms.mapWidth; |
551 |
+ xfree(ki->keySyms.map); |
552 |
ki->keySyms.map = ephyrKeySyms.map; |
553 |
ki->name = KdSaveString("Xephyr virtual keyboard"); |
554 |
ephyrKbd = ki; |
555 |
-- |
556 |
1.5.5.1 |
557 |
|
558 |
|
559 |
|
560 |
|
561 |
1.1 x11-base/xorg-server/files/1.4.0.90/0013-Fix-for-CVE-2007-5760-XFree86-Misc-extension-out-o.patch |
562 |
|
563 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0013-Fix-for-CVE-2007-5760-XFree86-Misc-extension-out-o.patch?rev=1.1&view=markup |
564 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0013-Fix-for-CVE-2007-5760-XFree86-Misc-extension-out-o.patch?rev=1.1&content-type=text/plain |
565 |
|
566 |
Index: 0013-Fix-for-CVE-2007-5760-XFree86-Misc-extension-out-o.patch |
567 |
=================================================================== |
568 |
From 59a3b83922c810316a374a19484b24901c7437ae Mon Sep 17 00:00:00 2001 |
569 |
From: Matthieu Herrb <matthieu@××××××××××××××.com> |
570 |
Date: Thu, 17 Jan 2008 15:26:41 +0100 |
571 |
Subject: [PATCH] Fix for CVE-2007-5760 - XFree86 Misc extension out of bounds array index |
572 |
|
573 |
--- |
574 |
hw/xfree86/common/xf86MiscExt.c | 4 ++++ |
575 |
1 files changed, 4 insertions(+), 0 deletions(-) |
576 |
|
577 |
diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c |
578 |
index c1b9c60..40c196a 100644 |
579 |
--- a/hw/xfree86/common/xf86MiscExt.c |
580 |
+++ b/hw/xfree86/common/xf86MiscExt.c |
581 |
@@ -548,6 +548,10 @@ MiscExtPassMessage(int scrnIndex, const char *msgtype, const char *msgval, |
582 |
{ |
583 |
ScrnInfoPtr pScr = xf86Screens[scrnIndex]; |
584 |
|
585 |
+ /* should check this in the protocol, but xf86NumScreens isn't exported */ |
586 |
+ if (scrnIndex >= xf86NumScreens) |
587 |
+ return BadValue; |
588 |
+ |
589 |
if (*pScr->HandleMessage == NULL) |
590 |
return BadImplementation; |
591 |
return (*pScr->HandleMessage)(scrnIndex, msgtype, msgval, retstr); |
592 |
-- |
593 |
1.5.5.1 |
594 |
|
595 |
|
596 |
|
597 |
|
598 |
1.1 x11-base/xorg-server/files/1.4.0.90/0014-Fix-for-CVE-2007-6428-TOG-cup-extension-memory-cor.patch |
599 |
|
600 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0014-Fix-for-CVE-2007-6428-TOG-cup-extension-memory-cor.patch?rev=1.1&view=markup |
601 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0014-Fix-for-CVE-2007-6428-TOG-cup-extension-memory-cor.patch?rev=1.1&content-type=text/plain |
602 |
|
603 |
Index: 0014-Fix-for-CVE-2007-6428-TOG-cup-extension-memory-cor.patch |
604 |
=================================================================== |
605 |
From 4848d49d05a318559afe7a17a19ba055947ee1f5 Mon Sep 17 00:00:00 2001 |
606 |
From: Matthieu Herrb <matthieu@××××××××××××××.com> |
607 |
Date: Thu, 17 Jan 2008 15:28:03 +0100 |
608 |
Subject: [PATCH] Fix for CVE-2007-6428 - TOG-cup extension memory corruption. |
609 |
|
610 |
--- |
611 |
Xext/cup.c | 3 +++ |
612 |
1 files changed, 3 insertions(+), 0 deletions(-) |
613 |
|
614 |
diff --git a/Xext/cup.c b/Xext/cup.c |
615 |
index 6bfa278..781b9ce 100644 |
616 |
--- a/Xext/cup.c |
617 |
+++ b/Xext/cup.c |
618 |
@@ -196,6 +196,9 @@ int ProcGetReservedColormapEntries( |
619 |
|
620 |
REQUEST_SIZE_MATCH (xXcupGetReservedColormapEntriesReq); |
621 |
|
622 |
+ if (stuff->screen >= screenInfo.numScreens) |
623 |
+ return BadValue; |
624 |
+ |
625 |
#ifndef HAVE_SPECIAL_DESKTOP_COLORS |
626 |
citems[CUP_BLACK_PIXEL].pixel = |
627 |
screenInfo.screens[stuff->screen]->blackPixel; |
628 |
-- |
629 |
1.5.5.1 |
630 |
|
631 |
|
632 |
|
633 |
|
634 |
1.1 x11-base/xorg-server/files/1.4.0.90/0015-Fix-for-CVE-2007-6427-Xinput-extension-memory-corr.patch |
635 |
|
636 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0015-Fix-for-CVE-2007-6427-Xinput-extension-memory-corr.patch?rev=1.1&view=markup |
637 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0015-Fix-for-CVE-2007-6427-Xinput-extension-memory-corr.patch?rev=1.1&content-type=text/plain |
638 |
|
639 |
Index: 0015-Fix-for-CVE-2007-6427-Xinput-extension-memory-corr.patch |
640 |
=================================================================== |
641 |
From d244c8272e0ac47c41a9416e37293903b842a78b Mon Sep 17 00:00:00 2001 |
642 |
From: Matthieu Herrb <matthieu@××××××××××××××.com> |
643 |
Date: Thu, 17 Jan 2008 15:27:34 +0100 |
644 |
Subject: [PATCH] Fix for CVE-2007-6427 - Xinput extension memory corruption. |
645 |
|
646 |
--- |
647 |
Xi/chgfctl.c | 7 +------ |
648 |
Xi/chgkmap.c | 13 ++++++------- |
649 |
Xi/chgprop.c | 10 +++------- |
650 |
Xi/grabdev.c | 12 +++++------- |
651 |
Xi/grabdevb.c | 10 +++------- |
652 |
Xi/grabdevk.c | 9 ++------- |
653 |
Xi/selectev.c | 11 ++++------- |
654 |
Xi/sendexev.c | 14 ++++++++------ |
655 |
8 files changed, 32 insertions(+), 54 deletions(-) |
656 |
|
657 |
diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c |
658 |
index 2e0e13c..235d659 100644 |
659 |
--- a/Xi/chgfctl.c |
660 |
+++ b/Xi/chgfctl.c |
661 |
@@ -327,18 +327,13 @@ ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev, |
662 |
xStringFeedbackCtl * f) |
663 |
{ |
664 |
char n; |
665 |
- long *p; |
666 |
int i, j; |
667 |
KeySym *syms, *sup_syms; |
668 |
|
669 |
syms = (KeySym *) (f + 1); |
670 |
if (client->swapped) { |
671 |
swaps(&f->length, n); /* swapped num_keysyms in calling proc */ |
672 |
- p = (long *)(syms); |
673 |
- for (i = 0; i < f->num_keysyms; i++) { |
674 |
- swapl(p, n); |
675 |
- p++; |
676 |
- } |
677 |
+ SwapLongs((CARD32 *) syms, f->num_keysyms); |
678 |
} |
679 |
|
680 |
if (f->num_keysyms > s->ctrl.max_symbols) { |
681 |
diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c |
682 |
index eac520f..f8f85bc 100644 |
683 |
--- a/Xi/chgkmap.c |
684 |
+++ b/Xi/chgkmap.c |
685 |
@@ -79,18 +79,14 @@ int |
686 |
SProcXChangeDeviceKeyMapping(ClientPtr client) |
687 |
{ |
688 |
char n; |
689 |
- long *p; |
690 |
- int i, count; |
691 |
+ unsigned int count; |
692 |
|
693 |
REQUEST(xChangeDeviceKeyMappingReq); |
694 |
swaps(&stuff->length, n); |
695 |
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); |
696 |
- p = (long *)&stuff[1]; |
697 |
count = stuff->keyCodes * stuff->keySymsPerKeyCode; |
698 |
- for (i = 0; i < count; i++) { |
699 |
- swapl(p, n); |
700 |
- p++; |
701 |
- } |
702 |
+ REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); |
703 |
+ SwapLongs((CARD32 *) (&stuff[1]), count); |
704 |
return (ProcXChangeDeviceKeyMapping(client)); |
705 |
} |
706 |
|
707 |
@@ -106,10 +102,13 @@ ProcXChangeDeviceKeyMapping(ClientPtr client) |
708 |
int ret; |
709 |
unsigned len; |
710 |
DeviceIntPtr dev; |
711 |
+ unsigned int count; |
712 |
|
713 |
REQUEST(xChangeDeviceKeyMappingReq); |
714 |
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); |
715 |
|
716 |
+ count = stuff->keyCodes * stuff->keySymsPerKeyCode; |
717 |
+ REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); |
718 |
dev = LookupDeviceIntRec(stuff->deviceid); |
719 |
if (dev == NULL) { |
720 |
SendErrorToClient(client, IReqCode, X_ChangeDeviceKeyMapping, 0, |
721 |
diff --git a/Xi/chgprop.c b/Xi/chgprop.c |
722 |
index 59a93c6..21bda5b 100644 |
723 |
--- a/Xi/chgprop.c |
724 |
+++ b/Xi/chgprop.c |
725 |
@@ -81,19 +81,15 @@ int |
726 |
SProcXChangeDeviceDontPropagateList(ClientPtr client) |
727 |
{ |
728 |
char n; |
729 |
- long *p; |
730 |
- int i; |
731 |
|
732 |
REQUEST(xChangeDeviceDontPropagateListReq); |
733 |
swaps(&stuff->length, n); |
734 |
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); |
735 |
swapl(&stuff->window, n); |
736 |
swaps(&stuff->count, n); |
737 |
- p = (long *)&stuff[1]; |
738 |
- for (i = 0; i < stuff->count; i++) { |
739 |
- swapl(p, n); |
740 |
- p++; |
741 |
- } |
742 |
+ REQUEST_FIXED_SIZE(xChangeDeviceDontPropagateListReq, |
743 |
+ stuff->count * sizeof(CARD32)); |
744 |
+ SwapLongs((CARD32 *) (&stuff[1]), stuff->count); |
745 |
return (ProcXChangeDeviceDontPropagateList(client)); |
746 |
} |
747 |
|
748 |
diff --git a/Xi/grabdev.c b/Xi/grabdev.c |
749 |
index e2809ef..d0b4ae7 100644 |
750 |
--- a/Xi/grabdev.c |
751 |
+++ b/Xi/grabdev.c |
752 |
@@ -82,8 +82,6 @@ int |
753 |
SProcXGrabDevice(ClientPtr client) |
754 |
{ |
755 |
char n; |
756 |
- long *p; |
757 |
- int i; |
758 |
|
759 |
REQUEST(xGrabDeviceReq); |
760 |
swaps(&stuff->length, n); |
761 |
@@ -91,11 +89,11 @@ SProcXGrabDevice(ClientPtr client) |
762 |
swapl(&stuff->grabWindow, n); |
763 |
swapl(&stuff->time, n); |
764 |
swaps(&stuff->event_count, n); |
765 |
- p = (long *)&stuff[1]; |
766 |
- for (i = 0; i < stuff->event_count; i++) { |
767 |
- swapl(p, n); |
768 |
- p++; |
769 |
- } |
770 |
+ |
771 |
+ if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count) |
772 |
+ return BadLength; |
773 |
+ |
774 |
+ SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); |
775 |
|
776 |
return (ProcXGrabDevice(client)); |
777 |
} |
778 |
diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c |
779 |
index df62d0c..18db1f7 100644 |
780 |
--- a/Xi/grabdevb.c |
781 |
+++ b/Xi/grabdevb.c |
782 |
@@ -80,8 +80,6 @@ int |
783 |
SProcXGrabDeviceButton(ClientPtr client) |
784 |
{ |
785 |
char n; |
786 |
- long *p; |
787 |
- int i; |
788 |
|
789 |
REQUEST(xGrabDeviceButtonReq); |
790 |
swaps(&stuff->length, n); |
791 |
@@ -89,11 +87,9 @@ SProcXGrabDeviceButton(ClientPtr client) |
792 |
swapl(&stuff->grabWindow, n); |
793 |
swaps(&stuff->modifiers, n); |
794 |
swaps(&stuff->event_count, n); |
795 |
- p = (long *)&stuff[1]; |
796 |
- for (i = 0; i < stuff->event_count; i++) { |
797 |
- swapl(p, n); |
798 |
- p++; |
799 |
- } |
800 |
+ REQUEST_FIXED_SIZE(xGrabDeviceButtonReq, |
801 |
+ stuff->event_count * sizeof(CARD32)); |
802 |
+ SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); |
803 |
|
804 |
return (ProcXGrabDeviceButton(client)); |
805 |
} |
806 |
diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c |
807 |
index b74592f..429b2f7 100644 |
808 |
--- a/Xi/grabdevk.c |
809 |
+++ b/Xi/grabdevk.c |
810 |
@@ -80,8 +80,6 @@ int |
811 |
SProcXGrabDeviceKey(ClientPtr client) |
812 |
{ |
813 |
char n; |
814 |
- long *p; |
815 |
- int i; |
816 |
|
817 |
REQUEST(xGrabDeviceKeyReq); |
818 |
swaps(&stuff->length, n); |
819 |
@@ -89,11 +87,8 @@ SProcXGrabDeviceKey(ClientPtr client) |
820 |
swapl(&stuff->grabWindow, n); |
821 |
swaps(&stuff->modifiers, n); |
822 |
swaps(&stuff->event_count, n); |
823 |
- p = (long *)&stuff[1]; |
824 |
- for (i = 0; i < stuff->event_count; i++) { |
825 |
- swapl(p, n); |
826 |
- p++; |
827 |
- } |
828 |
+ REQUEST_FIXED_SIZE(xGrabDeviceKeyReq, stuff->event_count * sizeof(CARD32)); |
829 |
+ SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); |
830 |
return (ProcXGrabDeviceKey(client)); |
831 |
} |
832 |
|
833 |
diff --git a/Xi/selectev.c b/Xi/selectev.c |
834 |
index d52db1b..19415c5 100644 |
835 |
--- a/Xi/selectev.c |
836 |
+++ b/Xi/selectev.c |
837 |
@@ -131,19 +131,16 @@ int |
838 |
SProcXSelectExtensionEvent(ClientPtr client) |
839 |
{ |
840 |
char n; |
841 |
- long *p; |
842 |
- int i; |
843 |
|
844 |
REQUEST(xSelectExtensionEventReq); |
845 |
swaps(&stuff->length, n); |
846 |
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); |
847 |
swapl(&stuff->window, n); |
848 |
swaps(&stuff->count, n); |
849 |
- p = (long *)&stuff[1]; |
850 |
- for (i = 0; i < stuff->count; i++) { |
851 |
- swapl(p, n); |
852 |
- p++; |
853 |
- } |
854 |
+ REQUEST_FIXED_SIZE(xSelectExtensionEventReq, |
855 |
+ stuff->count * sizeof(CARD32)); |
856 |
+ SwapLongs((CARD32 *) (&stuff[1]), stuff->count); |
857 |
+ |
858 |
return (ProcXSelectExtensionEvent(client)); |
859 |
} |
860 |
|
861 |
diff --git a/Xi/sendexev.c b/Xi/sendexev.c |
862 |
index eac9abe..9803cf3 100644 |
863 |
--- a/Xi/sendexev.c |
864 |
+++ b/Xi/sendexev.c |
865 |
@@ -83,7 +83,7 @@ int |
866 |
SProcXSendExtensionEvent(ClientPtr client) |
867 |
{ |
868 |
char n; |
869 |
- long *p; |
870 |
+ CARD32 *p; |
871 |
int i; |
872 |
xEvent eventT; |
873 |
xEvent *eventP; |
874 |
@@ -94,6 +94,11 @@ SProcXSendExtensionEvent(ClientPtr client) |
875 |
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); |
876 |
swapl(&stuff->destination, n); |
877 |
swaps(&stuff->count, n); |
878 |
+ |
879 |
+ if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count + |
880 |
+ (stuff->num_events * (sizeof(xEvent) >> 2))) |
881 |
+ return BadLength; |
882 |
+ |
883 |
eventP = (xEvent *) & stuff[1]; |
884 |
for (i = 0; i < stuff->num_events; i++, eventP++) { |
885 |
proc = EventSwapVector[eventP->u.u.type & 0177]; |
886 |
@@ -103,11 +108,8 @@ SProcXSendExtensionEvent(ClientPtr client) |
887 |
*eventP = eventT; |
888 |
} |
889 |
|
890 |
- p = (long *)(((xEvent *) & stuff[1]) + stuff->num_events); |
891 |
- for (i = 0; i < stuff->count; i++) { |
892 |
- swapl(p, n); |
893 |
- p++; |
894 |
- } |
895 |
+ p = (CARD32 *)(((xEvent *) & stuff[1]) + stuff->num_events); |
896 |
+ SwapLongs(p, stuff->count); |
897 |
return (ProcXSendExtensionEvent(client)); |
898 |
} |
899 |
|
900 |
-- |
901 |
1.5.5.1 |
902 |
|
903 |
|
904 |
|
905 |
|
906 |
1.1 x11-base/xorg-server/files/1.4.0.90/0016-Fix-for-CVE-2007-6429-MIT-SHM-and-EVI-extensions-i.patch |
907 |
|
908 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0016-Fix-for-CVE-2007-6429-MIT-SHM-and-EVI-extensions-i.patch?rev=1.1&view=markup |
909 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0016-Fix-for-CVE-2007-6429-MIT-SHM-and-EVI-extensions-i.patch?rev=1.1&content-type=text/plain |
910 |
|
911 |
Index: 0016-Fix-for-CVE-2007-6429-MIT-SHM-and-EVI-extensions-i.patch |
912 |
=================================================================== |
913 |
From 8b14f7b74284900b95a319ec80c4333e63af2296 Mon Sep 17 00:00:00 2001 |
914 |
From: Matthieu Herrb <matthieu@××××××××××××××.com> |
915 |
Date: Thu, 17 Jan 2008 15:28:42 +0100 |
916 |
Subject: [PATCH] Fix for CVE-2007-6429 - MIT-SHM and EVI extensions integer overflows. |
917 |
|
918 |
--- |
919 |
Xext/EVI.c | 15 ++++++++++++++- |
920 |
Xext/sampleEVI.c | 29 ++++++++++++++++++++++++----- |
921 |
Xext/shm.c | 46 ++++++++++++++++++++++++++++++++++++++-------- |
922 |
3 files changed, 76 insertions(+), 14 deletions(-) |
923 |
|
924 |
diff --git a/Xext/EVI.c b/Xext/EVI.c |
925 |
index 8fe3481..13bd32a 100644 |
926 |
--- a/Xext/EVI.c |
927 |
+++ b/Xext/EVI.c |
928 |
@@ -34,6 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. |
929 |
#include <X11/extensions/XEVIstr.h> |
930 |
#include "EVIstruct.h" |
931 |
#include "modinit.h" |
932 |
+#include "scrnintstr.h" |
933 |
|
934 |
#if 0 |
935 |
static unsigned char XEVIReqCode = 0; |
936 |
@@ -87,10 +88,22 @@ ProcEVIGetVisualInfo(ClientPtr client) |
937 |
{ |
938 |
REQUEST(xEVIGetVisualInfoReq); |
939 |
xEVIGetVisualInfoReply rep; |
940 |
- int n, n_conflict, n_info, sz_info, sz_conflict; |
941 |
+ int i, n, n_conflict, n_info, sz_info, sz_conflict; |
942 |
VisualID32 *conflict; |
943 |
+ unsigned int total_visuals = 0; |
944 |
xExtendedVisualInfo *eviInfo; |
945 |
int status; |
946 |
+ |
947 |
+ /* |
948 |
+ * do this first, otherwise REQUEST_FIXED_SIZE can overflow. we assume |
949 |
+ * here that you don't have more than 2^32 visuals over all your screens; |
950 |
+ * this seems like a safe assumption. |
951 |
+ */ |
952 |
+ for (i = 0; i < screenInfo.numScreens; i++) |
953 |
+ total_visuals += screenInfo.screens[i]->numVisuals; |
954 |
+ if (stuff->n_visual > total_visuals) |
955 |
+ return BadValue; |
956 |
+ |
957 |
REQUEST_FIXED_SIZE(xEVIGetVisualInfoReq, stuff->n_visual * sz_VisualID32); |
958 |
status = eviPriv->getVisualInfo((VisualID32 *)&stuff[1], (int)stuff->n_visual, |
959 |
&eviInfo, &n_info, &conflict, &n_conflict); |
960 |
diff --git a/Xext/sampleEVI.c b/Xext/sampleEVI.c |
961 |
index 7508aa7..b871bfd 100644 |
962 |
--- a/Xext/sampleEVI.c |
963 |
+++ b/Xext/sampleEVI.c |
964 |
@@ -34,6 +34,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. |
965 |
#include <X11/extensions/XEVIstr.h> |
966 |
#include "EVIstruct.h" |
967 |
#include "scrnintstr.h" |
968 |
+ |
969 |
+#if HAVE_STDINT_H |
970 |
+#include <stdint.h> |
971 |
+#elif !defined(UINT32_MAX) |
972 |
+#define UINT32_MAX 0xffffffffU |
973 |
+#endif |
974 |
+ |
975 |
static int sampleGetVisualInfo( |
976 |
VisualID32 *visual, |
977 |
int n_visual, |
978 |
@@ -42,24 +49,36 @@ static int sampleGetVisualInfo( |
979 |
VisualID32 **conflict_rn, |
980 |
int *n_conflict_rn) |
981 |
{ |
982 |
- int max_sz_evi = n_visual * sz_xExtendedVisualInfo * screenInfo.numScreens; |
983 |
+ unsigned int max_sz_evi; |
984 |
VisualID32 *temp_conflict; |
985 |
xExtendedVisualInfo *evi; |
986 |
- int max_visuals = 0, max_sz_conflict, sz_conflict = 0; |
987 |
+ unsigned int max_visuals = 0, max_sz_conflict, sz_conflict = 0; |
988 |
register int visualI, scrI, sz_evi = 0, conflictI, n_conflict; |
989 |
- *evi_rn = evi = (xExtendedVisualInfo *)xalloc(max_sz_evi); |
990 |
- if (!*evi_rn) |
991 |
- return BadAlloc; |
992 |
+ |
993 |
+ if (n_visual > UINT32_MAX/(sz_xExtendedVisualInfo * screenInfo.numScreens)) |
994 |
+ return BadAlloc; |
995 |
+ max_sz_evi = n_visual * sz_xExtendedVisualInfo * screenInfo.numScreens; |
996 |
+ |
997 |
for (scrI = 0; scrI < screenInfo.numScreens; scrI++) { |
998 |
if (screenInfo.screens[scrI]->numVisuals > max_visuals) |
999 |
max_visuals = screenInfo.screens[scrI]->numVisuals; |
1000 |
} |
1001 |
+ |
1002 |
+ if (n_visual > UINT32_MAX/(sz_VisualID32 * screenInfo.numScreens |
1003 |
+ * max_visuals)) |
1004 |
+ return BadAlloc; |
1005 |
max_sz_conflict = n_visual * sz_VisualID32 * screenInfo.numScreens * max_visuals; |
1006 |
+ |
1007 |
+ *evi_rn = evi = (xExtendedVisualInfo *)xalloc(max_sz_evi); |
1008 |
+ if (!*evi_rn) |
1009 |
+ return BadAlloc; |
1010 |
+ |
1011 |
temp_conflict = (VisualID32 *)xalloc(max_sz_conflict); |
1012 |
if (!temp_conflict) { |
1013 |
xfree(*evi_rn); |
1014 |
return BadAlloc; |
1015 |
} |
1016 |
+ |
1017 |
for (scrI = 0; scrI < screenInfo.numScreens; scrI++) { |
1018 |
for (visualI = 0; visualI < n_visual; visualI++) { |
1019 |
evi[sz_evi].core_visual_id = visual[visualI]; |
1020 |
diff --git a/Xext/shm.c b/Xext/shm.c |
1021 |
index ac587be..5633be9 100644 |
1022 |
--- a/Xext/shm.c |
1023 |
+++ b/Xext/shm.c |
1024 |
@@ -711,6 +711,8 @@ ProcPanoramiXShmCreatePixmap( |
1025 |
int i, j, result, rc; |
1026 |
ShmDescPtr shmdesc; |
1027 |
REQUEST(xShmCreatePixmapReq); |
1028 |
+ unsigned int width, height, depth; |
1029 |
+ unsigned long size; |
1030 |
PanoramiXRes *newPix; |
1031 |
|
1032 |
REQUEST_SIZE_MATCH(xShmCreatePixmapReq); |
1033 |
@@ -724,11 +726,26 @@ ProcPanoramiXShmCreatePixmap( |
1034 |
return rc; |
1035 |
|
1036 |
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); |
1037 |
- if (!stuff->width || !stuff->height) |
1038 |
+ |
1039 |
+ width = stuff->width; |
1040 |
+ height = stuff->height; |
1041 |
+ depth = stuff->depth; |
1042 |
+ if (!width || !height || !depth) |
1043 |
{ |
1044 |
client->errorValue = 0; |
1045 |
return BadValue; |
1046 |
} |
1047 |
+ if (width > 32767 || height > 32767) |
1048 |
+ return BadAlloc; |
1049 |
+ size = PixmapBytePad(width, depth) * height; |
1050 |
+ if (sizeof(size) == 4) { |
1051 |
+ if (size < width * height) |
1052 |
+ return BadAlloc; |
1053 |
+ /* thankfully, offset is unsigned */ |
1054 |
+ if (stuff->offset + size < size) |
1055 |
+ return BadAlloc; |
1056 |
+ } |
1057 |
+ |
1058 |
if (stuff->depth != 1) |
1059 |
{ |
1060 |
pDepth = pDraw->pScreen->allowedDepths; |
1061 |
@@ -739,9 +756,7 @@ ProcPanoramiXShmCreatePixmap( |
1062 |
return BadValue; |
1063 |
} |
1064 |
CreatePmap: |
1065 |
- VERIFY_SHMSIZE(shmdesc, stuff->offset, |
1066 |
- PixmapBytePad(stuff->width, stuff->depth) * stuff->height, |
1067 |
- client); |
1068 |
+ VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); |
1069 |
|
1070 |
if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) |
1071 |
return BadAlloc; |
1072 |
@@ -1040,6 +1055,8 @@ ProcShmCreatePixmap(client) |
1073 |
register int i, rc; |
1074 |
ShmDescPtr shmdesc; |
1075 |
REQUEST(xShmCreatePixmapReq); |
1076 |
+ unsigned int width, height, depth; |
1077 |
+ unsigned long size; |
1078 |
|
1079 |
REQUEST_SIZE_MATCH(xShmCreatePixmapReq); |
1080 |
client->errorValue = stuff->pid; |
1081 |
@@ -1052,11 +1069,26 @@ ProcShmCreatePixmap(client) |
1082 |
return rc; |
1083 |
|
1084 |
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); |
1085 |
- if (!stuff->width || !stuff->height) |
1086 |
+ |
1087 |
+ width = stuff->width; |
1088 |
+ height = stuff->height; |
1089 |
+ depth = stuff->depth; |
1090 |
+ if (!width || !height || !depth) |
1091 |
{ |
1092 |
client->errorValue = 0; |
1093 |
return BadValue; |
1094 |
} |
1095 |
+ if (width > 32767 || height > 32767) |
1096 |
+ return BadAlloc; |
1097 |
+ size = PixmapBytePad(width, depth) * height; |
1098 |
+ if (sizeof(size) == 4) { |
1099 |
+ if (size < width * height) |
1100 |
+ return BadAlloc; |
1101 |
+ /* thankfully, offset is unsigned */ |
1102 |
+ if (stuff->offset + size < size) |
1103 |
+ return BadAlloc; |
1104 |
+ } |
1105 |
+ |
1106 |
if (stuff->depth != 1) |
1107 |
{ |
1108 |
pDepth = pDraw->pScreen->allowedDepths; |
1109 |
@@ -1067,9 +1099,7 @@ ProcShmCreatePixmap(client) |
1110 |
return BadValue; |
1111 |
} |
1112 |
CreatePmap: |
1113 |
- VERIFY_SHMSIZE(shmdesc, stuff->offset, |
1114 |
- PixmapBytePad(stuff->width, stuff->depth) * stuff->height, |
1115 |
- client); |
1116 |
+ VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); |
1117 |
pMap = (*shmFuncs[pDraw->pScreen->myNum]->CreatePixmap)( |
1118 |
pDraw->pScreen, stuff->width, |
1119 |
stuff->height, stuff->depth, |
1120 |
-- |
1121 |
1.5.5.1 |
1122 |
|
1123 |
|
1124 |
|
1125 |
|
1126 |
1.1 x11-base/xorg-server/files/1.4.0.90/0017-Fix-for-CVE-2008-0006-PCF-Font-parser-buffer-overf.patch |
1127 |
|
1128 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0017-Fix-for-CVE-2008-0006-PCF-Font-parser-buffer-overf.patch?rev=1.1&view=markup |
1129 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0017-Fix-for-CVE-2008-0006-PCF-Font-parser-buffer-overf.patch?rev=1.1&content-type=text/plain |
1130 |
|
1131 |
Index: 0017-Fix-for-CVE-2008-0006-PCF-Font-parser-buffer-overf.patch |
1132 |
=================================================================== |
1133 |
From f09b8007e7f6e60e0b9c9665ec632b578ae08b6f Mon Sep 17 00:00:00 2001 |
1134 |
From: Matthieu Herrb <matthieu@××××××××××××××.com> |
1135 |
Date: Thu, 17 Jan 2008 15:29:06 +0100 |
1136 |
Subject: [PATCH] Fix for CVE-2008-0006 - PCF Font parser buffer overflow. |
1137 |
|
1138 |
--- |
1139 |
dix/dixfonts.c | 7 +++++++ |
1140 |
1 files changed, 7 insertions(+), 0 deletions(-) |
1141 |
|
1142 |
diff --git a/dix/dixfonts.c b/dix/dixfonts.c |
1143 |
index c21b3ec..7bb2404 100644 |
1144 |
--- a/dix/dixfonts.c |
1145 |
+++ b/dix/dixfonts.c |
1146 |
@@ -325,6 +325,13 @@ doOpenFont(ClientPtr client, OFclosurePtr c) |
1147 |
err = BadFontName; |
1148 |
goto bail; |
1149 |
} |
1150 |
+ /* check values for firstCol, lastCol, firstRow, and lastRow */ |
1151 |
+ if (pfont->info.firstCol > pfont->info.lastCol || |
1152 |
+ pfont->info.firstRow > pfont->info.lastRow || |
1153 |
+ pfont->info.lastCol - pfont->info.firstCol > 255) { |
1154 |
+ err = AllocError; |
1155 |
+ goto bail; |
1156 |
+ } |
1157 |
if (!pfont->fpe) |
1158 |
pfont->fpe = fpe; |
1159 |
pfont->refcnt++; |
1160 |
-- |
1161 |
1.5.5.1 |
1162 |
|
1163 |
|
1164 |
|
1165 |
|
1166 |
1.1 x11-base/xorg-server/files/1.4.0.90/0018-Fix-for-CVE-2007-5958-File-existence-disclosure.patch |
1167 |
|
1168 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0018-Fix-for-CVE-2007-5958-File-existence-disclosure.patch?rev=1.1&view=markup |
1169 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0018-Fix-for-CVE-2007-5958-File-existence-disclosure.patch?rev=1.1&content-type=text/plain |
1170 |
|
1171 |
Index: 0018-Fix-for-CVE-2007-5958-File-existence-disclosure.patch |
1172 |
=================================================================== |
1173 |
From 19b95cdd1d14a1e7d1abba1880ab023c96f19bf5 Mon Sep 17 00:00:00 2001 |
1174 |
From: Matthieu Herrb <matthieu@××××××××××××××.com> |
1175 |
Date: Thu, 17 Jan 2008 17:03:39 +0100 |
1176 |
Subject: [PATCH] Fix for CVE-2007-5958 - File existence disclosure. |
1177 |
|
1178 |
--- |
1179 |
Xext/security.c | 4 ++-- |
1180 |
1 files changed, 2 insertions(+), 2 deletions(-) |
1181 |
|
1182 |
diff --git a/Xext/security.c b/Xext/security.c |
1183 |
index ba057de..e9d48c9 100644 |
1184 |
--- a/Xext/security.c |
1185 |
+++ b/Xext/security.c |
1186 |
@@ -1563,7 +1563,7 @@ SecurityLoadPropertyAccessList(void) |
1187 |
if (!SecurityPolicyFile) |
1188 |
return; |
1189 |
|
1190 |
- f = fopen(SecurityPolicyFile, "r"); |
1191 |
+ f = Fopen(SecurityPolicyFile, "r"); |
1192 |
if (!f) |
1193 |
{ |
1194 |
ErrorF("error opening security policy file %s\n", |
1195 |
@@ -1646,7 +1646,7 @@ SecurityLoadPropertyAccessList(void) |
1196 |
} |
1197 |
#endif /* PROPDEBUG */ |
1198 |
|
1199 |
- fclose(f); |
1200 |
+ Fclose(f); |
1201 |
} /* SecurityLoadPropertyAccessList */ |
1202 |
|
1203 |
|
1204 |
-- |
1205 |
1.5.5.1 |
1206 |
|
1207 |
|
1208 |
|
1209 |
|
1210 |
1.1 x11-base/xorg-server/files/1.4.0.90/0019-CVE-2007-6429-Don-t-spuriously-reject-8bpp-shm-pix.patch |
1211 |
|
1212 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0019-CVE-2007-6429-Don-t-spuriously-reject-8bpp-shm-pix.patch?rev=1.1&view=markup |
1213 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0019-CVE-2007-6429-Don-t-spuriously-reject-8bpp-shm-pix.patch?rev=1.1&content-type=text/plain |
1214 |
|
1215 |
Index: 0019-CVE-2007-6429-Don-t-spuriously-reject-8bpp-shm-pix.patch |
1216 |
=================================================================== |
1217 |
From b6d4cdf64f43ae805beada6122c8be2ed138742c Mon Sep 17 00:00:00 2001 |
1218 |
From: Adam Jackson <ajax@××××××.com> |
1219 |
Date: Fri, 18 Jan 2008 14:41:20 -0500 |
1220 |
Subject: [PATCH] CVE-2007-6429: Don't spuriously reject <8bpp shm pixmaps. |
1221 |
|
1222 |
Move size validation after depth validation, and only validate size if |
1223 |
the bpp of the pixmap format is > 8. If bpp < 8 then we're already |
1224 |
protected from overflow by the width and height checks. |
1225 |
(cherry picked from commit e9fa7c1c88a8130a48f772c92b186b8b777986b5) |
1226 |
--- |
1227 |
Xext/shm.c | 36 ++++++++++++++++++++---------------- |
1228 |
1 files changed, 20 insertions(+), 16 deletions(-) |
1229 |
|
1230 |
diff --git a/Xext/shm.c b/Xext/shm.c |
1231 |
index 5633be9..6f99e90 100644 |
1232 |
--- a/Xext/shm.c |
1233 |
+++ b/Xext/shm.c |
1234 |
@@ -737,14 +737,6 @@ ProcPanoramiXShmCreatePixmap( |
1235 |
} |
1236 |
if (width > 32767 || height > 32767) |
1237 |
return BadAlloc; |
1238 |
- size = PixmapBytePad(width, depth) * height; |
1239 |
- if (sizeof(size) == 4) { |
1240 |
- if (size < width * height) |
1241 |
- return BadAlloc; |
1242 |
- /* thankfully, offset is unsigned */ |
1243 |
- if (stuff->offset + size < size) |
1244 |
- return BadAlloc; |
1245 |
- } |
1246 |
|
1247 |
if (stuff->depth != 1) |
1248 |
{ |
1249 |
@@ -755,7 +747,17 @@ ProcPanoramiXShmCreatePixmap( |
1250 |
client->errorValue = stuff->depth; |
1251 |
return BadValue; |
1252 |
} |
1253 |
+ |
1254 |
CreatePmap: |
1255 |
+ size = PixmapBytePad(width, depth) * height; |
1256 |
+ if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { |
1257 |
+ if (size < width * height) |
1258 |
+ return BadAlloc; |
1259 |
+ /* thankfully, offset is unsigned */ |
1260 |
+ if (stuff->offset + size < size) |
1261 |
+ return BadAlloc; |
1262 |
+ } |
1263 |
+ |
1264 |
VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); |
1265 |
|
1266 |
if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) |
1267 |
@@ -1080,14 +1082,6 @@ ProcShmCreatePixmap(client) |
1268 |
} |
1269 |
if (width > 32767 || height > 32767) |
1270 |
return BadAlloc; |
1271 |
- size = PixmapBytePad(width, depth) * height; |
1272 |
- if (sizeof(size) == 4) { |
1273 |
- if (size < width * height) |
1274 |
- return BadAlloc; |
1275 |
- /* thankfully, offset is unsigned */ |
1276 |
- if (stuff->offset + size < size) |
1277 |
- return BadAlloc; |
1278 |
- } |
1279 |
|
1280 |
if (stuff->depth != 1) |
1281 |
{ |
1282 |
@@ -1098,7 +1092,17 @@ ProcShmCreatePixmap(client) |
1283 |
client->errorValue = stuff->depth; |
1284 |
return BadValue; |
1285 |
} |
1286 |
+ |
1287 |
CreatePmap: |
1288 |
+ size = PixmapBytePad(width, depth) * height; |
1289 |
+ if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { |
1290 |
+ if (size < width * height) |
1291 |
+ return BadAlloc; |
1292 |
+ /* thankfully, offset is unsigned */ |
1293 |
+ if (stuff->offset + size < size) |
1294 |
+ return BadAlloc; |
1295 |
+ } |
1296 |
+ |
1297 |
VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); |
1298 |
pMap = (*shmFuncs[pDraw->pScreen->myNum]->CreatePixmap)( |
1299 |
pDraw->pScreen, stuff->width, |
1300 |
-- |
1301 |
1.5.5.1 |
1302 |
|
1303 |
|
1304 |
|
1305 |
|
1306 |
1.1 x11-base/xorg-server/files/1.4.0.90/0020-dix-set-the-correct-number-of-valuators-in-valuator.patch |
1307 |
|
1308 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0020-dix-set-the-correct-number-of-valuators-in-valuator.patch?rev=1.1&view=markup |
1309 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0020-dix-set-the-correct-number-of-valuators-in-valuator.patch?rev=1.1&content-type=text/plain |
1310 |
|
1311 |
Index: 0020-dix-set-the-correct-number-of-valuators-in-valuator.patch |
1312 |
=================================================================== |
1313 |
From e98027c3ac7195fec665ef393d980b02870ca1b8 Mon Sep 17 00:00:00 2001 |
1314 |
From: Peter Hutterer <peter@××××××××××××.au> |
1315 |
Date: Tue, 18 Dec 2007 13:57:07 +1030 |
1316 |
Subject: [PATCH] dix: set the correct number of valuators in valuator events. |
1317 |
|
1318 |
(first_valuator + num_valuators) must never be larger than the number of axes, |
1319 |
otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is |
1320 |
wrong too. |
1321 |
(cherry picked from commit 9f6ae61ad12cc2813d04405458e1ca5aed8a539e) |
1322 |
--- |
1323 |
dix/getevents.c | 2 +- |
1324 |
1 files changed, 1 insertions(+), 1 deletions(-) |
1325 |
|
1326 |
diff --git a/dix/getevents.c b/dix/getevents.c |
1327 |
index 12d8189..b7ba69b 100644 |
1328 |
--- a/dix/getevents.c |
1329 |
+++ b/dix/getevents.c |
1330 |
@@ -344,7 +344,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator, |
1331 |
for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) { |
1332 |
xv->type = DeviceValuator; |
1333 |
xv->first_valuator = i; |
1334 |
- xv->num_valuators = num_valuators; |
1335 |
+ xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); |
1336 |
xv->deviceid = pDev->id; |
1337 |
switch (final_valuator - i) { |
1338 |
case 6: |
1339 |
-- |
1340 |
1.5.5.1 |
1341 |
|
1342 |
|
1343 |
|
1344 |
|
1345 |
1.1 x11-base/xorg-server/files/1.4.0.90/0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch |
1346 |
|
1347 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch?rev=1.1&view=markup |
1348 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch?rev=1.1&content-type=text/plain |
1349 |
|
1350 |
Index: 0021-xkb-don-t-update-LEDs-if-they-don-t-exist.-Bug-13.patch |
1351 |
=================================================================== |
1352 |
From bc72ef3a159efd67067322c043bba444869dc356 Mon Sep 17 00:00:00 2001 |
1353 |
From: Peter Hutterer <peter@××××××××××××.au> |
1354 |
Date: Wed, 30 Jan 2008 10:39:54 +1030 |
1355 |
Subject: [PATCH] xkb: don't update LEDs if they don't exist. (Bug #13961) |
1356 |
|
1357 |
In some weird cases we call this function when there is no SrvLedInfo on the |
1358 |
device. And it turns out null-pointer dereferences are bad. |
1359 |
|
1360 |
X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961> |
1361 |
(cherry picked from commit d954f9c80348de294602d931d387e5cd1ef4b9a5) |
1362 |
--- |
1363 |
xkb/xkbLEDs.c | 3 +++ |
1364 |
1 files changed, 3 insertions(+), 0 deletions(-) |
1365 |
|
1366 |
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c |
1367 |
index d607d90..d28973c 100644 |
1368 |
--- a/xkb/xkbLEDs.c |
1369 |
+++ b/xkb/xkbLEDs.c |
1370 |
@@ -63,6 +63,9 @@ XkbSrvLedInfoPtr sli; |
1371 |
|
1372 |
sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0); |
1373 |
|
1374 |
+ if (!sli) |
1375 |
+ return update; |
1376 |
+ |
1377 |
if (state_changes&(XkbModifierStateMask|XkbGroupStateMask)) |
1378 |
update|= sli->usesEffective; |
1379 |
if (state_changes&(XkbModifierBaseMask|XkbGroupBaseMask)) |
1380 |
-- |
1381 |
1.5.5.1 |
1382 |
|
1383 |
|
1384 |
|
1385 |
|
1386 |
1.1 x11-base/xorg-server/files/1.4.0.90/0022-security-Fix-for-Bug-14480-untrusted-access-broke.patch |
1387 |
|
1388 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0022-security-Fix-for-Bug-14480-untrusted-access-broke.patch?rev=1.1&view=markup |
1389 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0022-security-Fix-for-Bug-14480-untrusted-access-broke.patch?rev=1.1&content-type=text/plain |
1390 |
|
1391 |
Index: 0022-security-Fix-for-Bug-14480-untrusted-access-broke.patch |
1392 |
=================================================================== |
1393 |
From 74b40bba327a2e97780e8e3f995f784add2d6231 Mon Sep 17 00:00:00 2001 |
1394 |
From: Eamon Walsh <ewalsh@×××××××××.gov> |
1395 |
Date: Thu, 14 Feb 2008 19:47:44 -0500 |
1396 |
Subject: [PATCH] security: Fix for Bug #14480: untrusted access broken in 7.3. |
1397 |
|
1398 |
--- |
1399 |
Xext/security.c | 2 +- |
1400 |
1 files changed, 1 insertions(+), 1 deletions(-) |
1401 |
|
1402 |
diff --git a/Xext/security.c b/Xext/security.c |
1403 |
index e9d48c9..14ad354 100644 |
1404 |
--- a/Xext/security.c |
1405 |
+++ b/Xext/security.c |
1406 |
@@ -1014,7 +1014,7 @@ CALLBACK(SecurityCheckResourceIDAccess) |
1407 |
} |
1408 |
else /* server-owned resource - probably a default colormap or root window */ |
1409 |
{ |
1410 |
- if (RT_WINDOW == rtype || RC_DRAWABLE == rtype) |
1411 |
+ if (RC_DRAWABLE & rtype) |
1412 |
{ |
1413 |
switch (reqtype) |
1414 |
{ /* the following operations are allowed on root windows */ |
1415 |
-- |
1416 |
1.5.5.1 |
1417 |
|
1418 |
|
1419 |
|
1420 |
|
1421 |
1.1 x11-base/xorg-server/files/1.4.0.90/0023-Resize-composite-overlay-window-when-the-root-window.patch |
1422 |
|
1423 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0023-Resize-composite-overlay-window-when-the-root-window.patch?rev=1.1&view=markup |
1424 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0023-Resize-composite-overlay-window-when-the-root-window.patch?rev=1.1&content-type=text/plain |
1425 |
|
1426 |
Index: 0023-Resize-composite-overlay-window-when-the-root-window.patch |
1427 |
=================================================================== |
1428 |
From 3db5930c61aeb849de3b21e7ba0d86d3c0cf72bb Mon Sep 17 00:00:00 2001 |
1429 |
From: Maarten Maathuis <madman2003@×××××.com> |
1430 |
Date: Sun, 17 Feb 2008 11:21:01 +0100 |
1431 |
Subject: [PATCH] Resize composite overlay window when the root window changes. |
1432 |
|
1433 |
- This allows some compositing managers to work, even after randr12 has changed the root window size. |
1434 |
- Thanks to ajax for figuring out the best place to put this. |
1435 |
- Example: |
1436 |
- xf86RandR12SetMode() calls EnableDisableFBAccess(). |
1437 |
- That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize(). |
1438 |
- The final step is the call to PositionWindow(). |
1439 |
(cherry picked from commit 70c0592a97c7dc9db0576d32b3bdbe4766520509) |
1440 |
--- |
1441 |
composite/compwindow.c | 25 +++++++++++++++++++++++++ |
1442 |
1 files changed, 25 insertions(+), 0 deletions(-) |
1443 |
|
1444 |
diff --git a/composite/compwindow.c b/composite/compwindow.c |
1445 |
index bfd2946..33192ad 100644 |
1446 |
--- a/composite/compwindow.c |
1447 |
+++ b/composite/compwindow.c |
1448 |
@@ -165,6 +165,29 @@ compCheckRedirect (WindowPtr pWin) |
1449 |
return TRUE; |
1450 |
} |
1451 |
|
1452 |
+static int |
1453 |
+updateOverlayWindow(ScreenPtr pScreen) |
1454 |
+{ |
1455 |
+ CompScreenPtr cs; |
1456 |
+ WindowPtr pWin; /* overlay window */ |
1457 |
+ XID vlist[2]; |
1458 |
+ |
1459 |
+ cs = GetCompScreen(pScreen); |
1460 |
+ if ((pWin = cs->pOverlayWin) != NULL) { |
1461 |
+ if ((pWin->drawable.width == pScreen->width) && |
1462 |
+ (pWin->drawable.height == pScreen->height)) |
1463 |
+ return Success; |
1464 |
+ |
1465 |
+ /* Let's resize the overlay window. */ |
1466 |
+ vlist[0] = pScreen->width; |
1467 |
+ vlist[1] = pScreen->height; |
1468 |
+ return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin)); |
1469 |
+ } |
1470 |
+ |
1471 |
+ /* Let's be on the safe side and not assume an overlay window is always allocated. */ |
1472 |
+ return Success; |
1473 |
+} |
1474 |
+ |
1475 |
Bool |
1476 |
compPositionWindow (WindowPtr pWin, int x, int y) |
1477 |
{ |
1478 |
@@ -203,6 +226,8 @@ compPositionWindow (WindowPtr pWin, int x, int y) |
1479 |
cs->PositionWindow = pScreen->PositionWindow; |
1480 |
pScreen->PositionWindow = compPositionWindow; |
1481 |
compCheckTree (pWin->drawable.pScreen); |
1482 |
+ if (updateOverlayWindow(pScreen) != Success) |
1483 |
+ ret = FALSE; |
1484 |
return ret; |
1485 |
} |
1486 |
|
1487 |
-- |
1488 |
1.5.5.1 |
1489 |
|
1490 |
|
1491 |
|
1492 |
|
1493 |
1.1 x11-base/xorg-server/files/1.4.0.90/0024-Fix-rotation-for-multi-monitor-situation.patch |
1494 |
|
1495 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0024-Fix-rotation-for-multi-monitor-situation.patch?rev=1.1&view=markup |
1496 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0024-Fix-rotation-for-multi-monitor-situation.patch?rev=1.1&content-type=text/plain |
1497 |
|
1498 |
Index: 0024-Fix-rotation-for-multi-monitor-situation.patch |
1499 |
=================================================================== |
1500 |
From dc30ade6496c7cc24e38c419e229159525fe042f Mon Sep 17 00:00:00 2001 |
1501 |
From: Maarten Maathuis <madman2003@×××××.com> |
1502 |
Date: Sun, 17 Feb 2008 18:47:28 +0100 |
1503 |
Subject: [PATCH] Fix rotation for multi-monitor situation. |
1504 |
|
1505 |
- The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find. |
1506 |
- Fix bug #13787. |
1507 |
(cherry picked from commit a48cc88ea2674c28b69b8d738b168cbafcf4001f) |
1508 |
--- |
1509 |
hw/xfree86/modes/xf86Rotate.c | 4 ++-- |
1510 |
1 files changed, 2 insertions(+), 2 deletions(-) |
1511 |
|
1512 |
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c |
1513 |
index 380478f..dd0e659 100644 |
1514 |
--- a/hw/xfree86/modes/xf86Rotate.c |
1515 |
+++ b/hw/xfree86/modes/xf86Rotate.c |
1516 |
@@ -579,9 +579,9 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) |
1517 |
} |
1518 |
else |
1519 |
{ |
1520 |
- PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, crtc->x, crtc->y); |
1521 |
+ PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y)); |
1522 |
PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc); |
1523 |
- |
1524 |
+ |
1525 |
/* |
1526 |
* these are the size of the shadow pixmap, which |
1527 |
* matches the mode, not the pre-rotated copy in the |
1528 |
-- |
1529 |
1.5.5.1 |
1530 |
|
1531 |
|
1532 |
|
1533 |
|
1534 |
1.1 x11-base/xorg-server/files/1.4.0.90/0025-Don-t-break-grab-and-focus-state-for-a-window-when-r.patch |
1535 |
|
1536 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0025-Don-t-break-grab-and-focus-state-for-a-window-when-r.patch?rev=1.1&view=markup |
1537 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0025-Don-t-break-grab-and-focus-state-for-a-window-when-r.patch?rev=1.1&content-type=text/plain |
1538 |
|
1539 |
Index: 0025-Don-t-break-grab-and-focus-state-for-a-window-when-r.patch |
1540 |
=================================================================== |
1541 |
From bcbfd619f8da888224afd80ee3a2db7d500523eb Mon Sep 17 00:00:00 2001 |
1542 |
From: =?utf-8?q?Kristian=20H=C3=B8gsberg?= <krh@××××××.com> |
1543 |
Date: Wed, 16 Jan 2008 20:24:11 -0500 |
1544 |
Subject: [PATCH] Don't break grab and focus state for a window when redirecting it. |
1545 |
|
1546 |
Composite uses an unmap/map cycle to trigger backing pixmap allocation |
1547 |
and cliprect recomputation when a window is redirected or unredirected. |
1548 |
To avoid protocol visible side effects, map and unmap events are |
1549 |
disabled temporarily. However, when a window is unmapped it is also |
1550 |
removed from grabs and loses focus, but these state changes are not |
1551 |
disabled. |
1552 |
|
1553 |
This change supresses the unmap side effects during the composite |
1554 |
unmap/map cycle and fixes this bug: |
1555 |
|
1556 |
http://bugzilla.gnome.org/show_bug.cgi?id=488264 |
1557 |
|
1558 |
where compiz would cause gnome-screensaver to lose its grab when |
1559 |
compiz unredirects the fullscreen lock window. |
1560 |
--- |
1561 |
dix/window.c | 3 ++- |
1562 |
1 files changed, 2 insertions(+), 1 deletions(-) |
1563 |
|
1564 |
diff --git a/dix/window.c b/dix/window.c |
1565 |
index be4ea2c..961c02a 100644 |
1566 |
--- a/dix/window.c |
1567 |
+++ b/dix/window.c |
1568 |
@@ -3023,7 +3023,8 @@ UnrealizeTree( |
1569 |
} |
1570 |
#endif |
1571 |
(* Unrealize)(pChild); |
1572 |
- DeleteWindowFromAnyEvents(pChild, FALSE); |
1573 |
+ if (MapUnmapEventsEnabled(pWin)) |
1574 |
+ DeleteWindowFromAnyEvents(pChild, FALSE); |
1575 |
if (pChild->viewable) |
1576 |
{ |
1577 |
#ifdef DO_SAVE_UNDERS |
1578 |
-- |
1579 |
1.5.5.1 |
1580 |
|
1581 |
|
1582 |
|
1583 |
|
1584 |
1.1 x11-base/xorg-server/files/1.4.0.90/0026-CVE-2007-6429-Always-test-for-size-offset-wrapping.patch |
1585 |
|
1586 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0026-CVE-2007-6429-Always-test-for-size-offset-wrapping.patch?rev=1.1&view=markup |
1587 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0026-CVE-2007-6429-Always-test-for-size-offset-wrapping.patch?rev=1.1&content-type=text/plain |
1588 |
|
1589 |
Index: 0026-CVE-2007-6429-Always-test-for-size-offset-wrapping.patch |
1590 |
=================================================================== |
1591 |
From 44f46bfb981ca69515dafc520f62f33654711194 Mon Sep 17 00:00:00 2001 |
1592 |
From: Matthias Hopf <mhopf@××××.de> |
1593 |
Date: Mon, 21 Jan 2008 16:13:21 +0100 |
1594 |
Subject: [PATCH] CVE-2007-6429: Always test for size+offset wrapping. |
1595 |
|
1596 |
--- |
1597 |
Xext/shm.c | 12 ++++++------ |
1598 |
1 files changed, 6 insertions(+), 6 deletions(-) |
1599 |
|
1600 |
diff --git a/Xext/shm.c b/Xext/shm.c |
1601 |
index 6f99e90..376f123 100644 |
1602 |
--- a/Xext/shm.c |
1603 |
+++ b/Xext/shm.c |
1604 |
@@ -753,10 +753,10 @@ CreatePmap: |
1605 |
if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { |
1606 |
if (size < width * height) |
1607 |
return BadAlloc; |
1608 |
- /* thankfully, offset is unsigned */ |
1609 |
- if (stuff->offset + size < size) |
1610 |
- return BadAlloc; |
1611 |
} |
1612 |
+ /* thankfully, offset is unsigned */ |
1613 |
+ if (stuff->offset + size < size) |
1614 |
+ return BadAlloc; |
1615 |
|
1616 |
VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); |
1617 |
|
1618 |
@@ -1098,10 +1098,10 @@ CreatePmap: |
1619 |
if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { |
1620 |
if (size < width * height) |
1621 |
return BadAlloc; |
1622 |
- /* thankfully, offset is unsigned */ |
1623 |
- if (stuff->offset + size < size) |
1624 |
- return BadAlloc; |
1625 |
} |
1626 |
+ /* thankfully, offset is unsigned */ |
1627 |
+ if (stuff->offset + size < size) |
1628 |
+ return BadAlloc; |
1629 |
|
1630 |
VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); |
1631 |
pMap = (*shmFuncs[pDraw->pScreen->myNum]->CreatePixmap)( |
1632 |
-- |
1633 |
1.5.5.1 |
1634 |
|
1635 |
|
1636 |
|
1637 |
|
1638 |
1.1 x11-base/xorg-server/files/1.4.0.90/0027-Fix-context-sharing-between-direct-indirect-contexts.patch |
1639 |
|
1640 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0027-Fix-context-sharing-between-direct-indirect-contexts.patch?rev=1.1&view=markup |
1641 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0027-Fix-context-sharing-between-direct-indirect-contexts.patch?rev=1.1&content-type=text/plain |
1642 |
|
1643 |
Index: 0027-Fix-context-sharing-between-direct-indirect-contexts.patch |
1644 |
=================================================================== |
1645 |
From a65d4aed06acd839fb21153f74144498abda3e18 Mon Sep 17 00:00:00 2001 |
1646 |
From: Alan Hourihane <alanh@××××××××××××××××.com> |
1647 |
Date: Wed, 27 Feb 2008 16:49:34 +0000 |
1648 |
Subject: [PATCH] Fix context sharing between direct/indirect contexts |
1649 |
|
1650 |
--- |
1651 |
GL/glx/glxdri.c | 8 ++++++++ |
1652 |
1 files changed, 8 insertions(+), 0 deletions(-) |
1653 |
|
1654 |
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c |
1655 |
index 685683d..09abca3 100644 |
1656 |
--- a/GL/glx/glxdri.c |
1657 |
+++ b/GL/glx/glxdri.c |
1658 |
@@ -598,6 +598,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, |
1659 |
else |
1660 |
sharePrivate = NULL; |
1661 |
|
1662 |
+ if (baseShareContext && baseShareContext->isDirect) |
1663 |
+ return NULL; |
1664 |
+ |
1665 |
context = xalloc(sizeof *context); |
1666 |
if (context == NULL) |
1667 |
return NULL; |
1668 |
@@ -617,6 +620,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, |
1669 |
0, /* render type */ |
1670 |
sharePrivate, |
1671 |
&context->driContext); |
1672 |
+ |
1673 |
+ if (!context->driContext.private) { |
1674 |
+ xfree(context); |
1675 |
+ return NULL; |
1676 |
+ } |
1677 |
|
1678 |
context->driContext.mode = modes; |
1679 |
|
1680 |
-- |
1681 |
1.5.5.1 |
1682 |
|
1683 |
|
1684 |
|
1685 |
|
1686 |
1.1 x11-base/xorg-server/files/1.4.0.90/0028-Add-some-more-support-for-DragonFly.-From-Joerg-Sonn.patch |
1687 |
|
1688 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0028-Add-some-more-support-for-DragonFly.-From-Joerg-Sonn.patch?rev=1.1&view=markup |
1689 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0028-Add-some-more-support-for-DragonFly.-From-Joerg-Sonn.patch?rev=1.1&content-type=text/plain |
1690 |
|
1691 |
Index: 0028-Add-some-more-support-for-DragonFly.-From-Joerg-Sonn.patch |
1692 |
=================================================================== |
1693 |
From 76b950cd6e03f0060afe463871de4570fca90213 Mon Sep 17 00:00:00 2001 |
1694 |
From: Jeremy C. Reed <reed@×××××××××××××××××.net> |
1695 |
Date: Thu, 16 Aug 2007 11:20:12 -0500 |
1696 |
Subject: [PATCH] Add some more support for DragonFly. From Joerg Sonnenberger |
1697 |
and pkgsrc. |
1698 |
(cherry picked from commit 1d4bea6106d7a1c83e1dfe37fad8268589feaa0b) |
1699 |
|
1700 |
--- |
1701 |
Xext/shm.c | 2 +- |
1702 |
Xext/xf86bigfont.c | 2 +- |
1703 |
hw/xfree86/loader/os.c | 2 ++ |
1704 |
hw/xfree86/os-support/bus/Pci.h | 2 +- |
1705 |
hw/xfree86/os-support/bus/freebsdPci.c | 2 +- |
1706 |
5 files changed, 6 insertions(+), 4 deletions(-) |
1707 |
|
1708 |
diff --git a/Xext/shm.c b/Xext/shm.c |
1709 |
index 376f123..3c0d1ee 100644 |
1710 |
--- a/Xext/shm.c |
1711 |
+++ b/Xext/shm.c |
1712 |
@@ -154,7 +154,7 @@ static ShmFuncs fbFuncs = {fbShmCreatePixmap, fbShmPutImage}; |
1713 |
} |
1714 |
|
1715 |
|
1716 |
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) |
1717 |
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__) |
1718 |
#include <sys/signal.h> |
1719 |
|
1720 |
static Bool badSysCall = FALSE; |
1721 |
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c |
1722 |
index f50481f..c2f891a 100644 |
1723 |
--- a/Xext/xf86bigfont.c |
1724 |
+++ b/Xext/xf86bigfont.c |
1725 |
@@ -104,7 +104,7 @@ static unsigned int pagesize; |
1726 |
|
1727 |
static Bool badSysCall = FALSE; |
1728 |
|
1729 |
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) |
1730 |
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__) |
1731 |
|
1732 |
#include <sys/signal.h> |
1733 |
|
1734 |
diff --git a/hw/xfree86/loader/os.c b/hw/xfree86/loader/os.c |
1735 |
index fdddce8..12cf3d8 100644 |
1736 |
--- a/hw/xfree86/loader/os.c |
1737 |
+++ b/hw/xfree86/loader/os.c |
1738 |
@@ -42,6 +42,8 @@ |
1739 |
#define OSNAME "linux" |
1740 |
#elif defined(__FreeBSD__) |
1741 |
#define OSNAME "freebsd" |
1742 |
+#elif defined(__DragonFly__) |
1743 |
+#define OSNAME "dragonfly" |
1744 |
#elif defined(__NetBSD__) |
1745 |
#define OSNAME "netbsd" |
1746 |
#elif defined(__OpenBSD__) |
1747 |
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h |
1748 |
index f0cb916..5ebbdd5 100644 |
1749 |
--- a/hw/xfree86/os-support/bus/Pci.h |
1750 |
+++ b/hw/xfree86/os-support/bus/Pci.h |
1751 |
@@ -235,7 +235,7 @@ |
1752 |
# if defined(linux) |
1753 |
# define ARCH_PCI_INIT axpPciInit |
1754 |
# define INCLUDE_XF86_MAP_PCI_MEM |
1755 |
-# elif defined(__FreeBSD__) || defined(__OpenBSD__) |
1756 |
+# elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) |
1757 |
# define ARCH_PCI_INIT freebsdPciInit |
1758 |
# define INCLUDE_XF86_MAP_PCI_MEM |
1759 |
# define INCLUDE_XF86_NO_DOMAIN |
1760 |
diff --git a/hw/xfree86/os-support/bus/freebsdPci.c b/hw/xfree86/os-support/bus/freebsdPci.c |
1761 |
index 61cb405..63c00b2 100644 |
1762 |
--- a/hw/xfree86/os-support/bus/freebsdPci.c |
1763 |
+++ b/hw/xfree86/os-support/bus/freebsdPci.c |
1764 |
@@ -83,7 +83,7 @@ static pciBusInfo_t freebsdPci0 = { |
1765 |
/* bridge */ NULL |
1766 |
}; |
1767 |
|
1768 |
-#if !defined(__OpenBSD__) && !defined(__FreeBSD__) |
1769 |
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) |
1770 |
#if X_BYTE_ORDER == X_BIG_ENDIAN |
1771 |
#ifdef __sparc__ |
1772 |
#ifndef ASI_PL |
1773 |
-- |
1774 |
1.5.5.1 |
1775 |
|
1776 |
|
1777 |
|
1778 |
|
1779 |
1.1 x11-base/xorg-server/files/1.4.0.90/0029-configure.ac-DragonFly-BSD-support.patch |
1780 |
|
1781 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0029-configure.ac-DragonFly-BSD-support.patch?rev=1.1&view=markup |
1782 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0029-configure.ac-DragonFly-BSD-support.patch?rev=1.1&content-type=text/plain |
1783 |
|
1784 |
Index: 0029-configure.ac-DragonFly-BSD-support.patch |
1785 |
=================================================================== |
1786 |
From dd6b0de38d649617600a8357e576955c9b831328 Mon Sep 17 00:00:00 2001 |
1787 |
From: Hasso Tepper <hasso@××××××.ee> |
1788 |
Date: Mon, 7 Apr 2008 14:09:04 +0300 |
1789 |
Subject: [PATCH] configure.ac: DragonFly BSD support |
1790 |
|
1791 |
Add support for DragonFly BSD, which is just the same as FreeBSD for all |
1792 |
of these cases. |
1793 |
(cherry picked from commit 0f87b41a432a6472a15ec0c9dee997e3bddbd0f2) |
1794 |
--- |
1795 |
configure.ac | 6 ++++-- |
1796 |
1 files changed, 4 insertions(+), 2 deletions(-) |
1797 |
|
1798 |
diff --git a/configure.ac b/configure.ac |
1799 |
index 72d9819..dfb2950 100644 |
1800 |
--- a/configure.ac |
1801 |
+++ b/configure.ac |
1802 |
@@ -291,6 +291,7 @@ case $host_cpu in |
1803 |
darwin*) use_x86_asm="no" ;; |
1804 |
*linux*) DEFAULT_INT10=vm86 ;; |
1805 |
*freebsd*) AC_DEFINE(USE_DEV_IO) ;; |
1806 |
+ *dragonfly*) AC_DEFINE(USE_DEV_IO) ;; |
1807 |
*netbsd*) AC_DEFINE(USE_I386_IOPL) |
1808 |
SYS_LIBS=-li386 |
1809 |
;; |
1810 |
@@ -316,6 +317,7 @@ case $host_cpu in |
1811 |
case $host_os in |
1812 |
darwin*) use_x86_asm="no" ;; |
1813 |
*freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; |
1814 |
+ *dragonfly*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; |
1815 |
*netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl]) |
1816 |
SYS_LIBS=-lx86_64 |
1817 |
;; |
1818 |
@@ -337,7 +339,7 @@ DRI=no |
1819 |
KDRIVE_HW=no |
1820 |
dnl it would be nice to autodetect these *CONS_SUPPORTs |
1821 |
case $host_os in |
1822 |
- *freebsd*) |
1823 |
+ *freebsd* | *dragonfly*) |
1824 |
case $host_os in |
1825 |
kfreebsd*-gnu) ;; |
1826 |
*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;; |
1827 |
@@ -1363,7 +1365,7 @@ return 0;} |
1828 |
;; |
1829 |
esac |
1830 |
;; |
1831 |
- freebsd* | kfreebsd*-gnu) |
1832 |
+ freebsd* | kfreebsd*-gnu | dragonfly*) |
1833 |
XORG_OS="freebsd" |
1834 |
XORG_OS_SUBDIR="bsd" |
1835 |
case $host_cpu in |
1836 |
-- |
1837 |
1.5.5.1 |
1838 |
|
1839 |
|
1840 |
|
1841 |
|
1842 |
1.1 x11-base/xorg-server/files/1.4.0.90/0030-Fixed-configure.ac-for-autoconf-2.62.patch |
1843 |
|
1844 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0030-Fixed-configure.ac-for-autoconf-2.62.patch?rev=1.1&view=markup |
1845 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0030-Fixed-configure.ac-for-autoconf-2.62.patch?rev=1.1&content-type=text/plain |
1846 |
|
1847 |
Index: 0030-Fixed-configure.ac-for-autoconf-2.62.patch |
1848 |
=================================================================== |
1849 |
From 9e9eeca2b094fa9edb9c20002d42aeafb14ad1e4 Mon Sep 17 00:00:00 2001 |
1850 |
From: Tilman Sauerbeck <tilman@×××××××××××.de> |
1851 |
Date: Thu, 10 Apr 2008 21:36:19 +0200 |
1852 |
Subject: [PATCH] Fixed configure.ac for autoconf 2.62. |
1853 |
(cherry picked from commit 3c337e18b933881e22b0d03312511f1d23a8640b) |
1854 |
|
1855 |
--- |
1856 |
configure.ac | 4 +++- |
1857 |
1 files changed, 3 insertions(+), 1 deletions(-) |
1858 |
|
1859 |
diff --git a/configure.ac b/configure.ac |
1860 |
index dfb2950..4841d26 100644 |
1861 |
--- a/configure.ac |
1862 |
+++ b/configure.ac |
1863 |
@@ -1964,7 +1964,9 @@ DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" |
1864 |
|
1865 |
AC_SUBST([DIX_CFLAGS]) |
1866 |
|
1867 |
-AC_SUBST([libdir exec_prefix prefix]) |
1868 |
+AC_SUBST([libdir]) |
1869 |
+AC_SUBST([exec_prefix]) |
1870 |
+AC_SUBST([prefix]) |
1871 |
|
1872 |
# Man page sections - used in config utils & generating man pages |
1873 |
XORG_MANPAGE_SECTIONS |
1874 |
-- |
1875 |
1.5.5.1 |
1876 |
|
1877 |
|
1878 |
|
1879 |
|
1880 |
1.1 x11-base/xorg-server/files/1.4.0.90/0031-EXA-Fix-off-by-one-in-polyline-drawing.patch |
1881 |
|
1882 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0031-EXA-Fix-off-by-one-in-polyline-drawing.patch?rev=1.1&view=markup |
1883 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0031-EXA-Fix-off-by-one-in-polyline-drawing.patch?rev=1.1&content-type=text/plain |
1884 |
|
1885 |
Index: 0031-EXA-Fix-off-by-one-in-polyline-drawing.patch |
1886 |
=================================================================== |
1887 |
From 6afcf996cade0c9464d6af9b04b177b1de138cfd Mon Sep 17 00:00:00 2001 |
1888 |
From: Pierre Willenbrock <pierre@××××××××××××××××.org> |
1889 |
Date: Tue, 23 Oct 2007 16:45:13 +0200 |
1890 |
Subject: [PATCH] EXA: Fix off-by-one in polyline drawing. |
1891 |
(cherry picked from commit d502521c3669f3f22b94c39a64ab63bfd92c6a97) |
1892 |
|
1893 |
--- |
1894 |
exa/exa_accel.c | 2 +- |
1895 |
1 files changed, 1 insertions(+), 1 deletions(-) |
1896 |
|
1897 |
diff --git a/exa/exa_accel.c b/exa/exa_accel.c |
1898 |
index aed4e42..e8444c6 100644 |
1899 |
--- a/exa/exa_accel.c |
1900 |
+++ b/exa/exa_accel.c |
1901 |
@@ -535,7 +535,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, |
1902 |
x1 = ppt[0].x; |
1903 |
y1 = ppt[0].y; |
1904 |
/* If we have any non-horizontal/vertical, fall back. */ |
1905 |
- for (i = 0; i < npt; i++) { |
1906 |
+ for (i = 0; i < npt - 1; i++) { |
1907 |
if (mode == CoordModePrevious) { |
1908 |
x2 = x1 + ppt[i + 1].x; |
1909 |
y2 = y1 + ppt[i + 1].y; |
1910 |
-- |
1911 |
1.5.5.1 |
1912 |
|
1913 |
|
1914 |
|
1915 |
|
1916 |
1.1 x11-base/xorg-server/files/1.4.0.90/0032-XKB-Fix-processInputProc-wrapping.patch |
1917 |
|
1918 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0032-XKB-Fix-processInputProc-wrapping.patch?rev=1.1&view=markup |
1919 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0032-XKB-Fix-processInputProc-wrapping.patch?rev=1.1&content-type=text/plain |
1920 |
|
1921 |
Index: 0032-XKB-Fix-processInputProc-wrapping.patch |
1922 |
=================================================================== |
1923 |
From fdfb57d342da0ace14eed635804ebc31441240c5 Mon Sep 17 00:00:00 2001 |
1924 |
From: Thomas Jaeger <thjaeger@×××××.com> |
1925 |
Date: Tue, 1 Apr 2008 15:27:06 +0300 |
1926 |
Subject: [PATCH] XKB: Fix processInputProc wrapping |
1927 |
|
1928 |
If input processing is frozen, only wrap realInputProc: don't smash |
1929 |
processInputProc as well. When input processing is thawed, pIP will be |
1930 |
rewrapped correctly. |
1931 |
|
1932 |
This supersedes the previous workaround in 50e80c9. |
1933 |
|
1934 |
Signed-off-by: Daniel Stone <daniel@×××××××××.org> |
1935 |
(cherry picked from commit 37b1258f0a288a79ce6a3eef3559e17a67c4dd96) |
1936 |
--- |
1937 |
include/xkbsrv.h | 16 ++++++++++++---- |
1938 |
xkb/xkbActions.c | 9 ++++----- |
1939 |
2 files changed, 16 insertions(+), 9 deletions(-) |
1940 |
|
1941 |
diff --git a/include/xkbsrv.h b/include/xkbsrv.h |
1942 |
index 9174eb6..acf3bb0 100644 |
1943 |
--- a/include/xkbsrv.h |
1944 |
+++ b/include/xkbsrv.h |
1945 |
@@ -241,6 +241,14 @@ typedef struct _XkbSrvLedInfo { |
1946 |
typedef struct |
1947 |
{ |
1948 |
ProcessInputProc processInputProc; |
1949 |
+ /* If processInputProc is set to something different than realInputProc, |
1950 |
+ * UNWRAP and COND_WRAP will not touch processInputProc and update only |
1951 |
+ * realInputProc. This ensures that |
1952 |
+ * processInputProc == (frozen ? EnqueueEvent : realInputProc) |
1953 |
+ * |
1954 |
+ * WRAP_PROCESS_INPUT_PROC should only be called during initialization, |
1955 |
+ * since it may destroy this invariant. |
1956 |
+ */ |
1957 |
ProcessInputProc realInputProc; |
1958 |
DeviceUnwrapProc unwrapProc; |
1959 |
} xkbDeviceInfoRec, *xkbDeviceInfoPtr; |
1960 |
@@ -258,14 +266,14 @@ typedef struct |
1961 |
device->public.processInputProc = proc; \ |
1962 |
oldprocs->processInputProc = \ |
1963 |
oldprocs->realInputProc = device->public.realInputProc; \ |
1964 |
- if (proc != device->public.enqueueInputProc) \ |
1965 |
- device->public.realInputProc = proc; \ |
1966 |
+ device->public.realInputProc = proc; \ |
1967 |
oldprocs->unwrapProc = device->unwrapProc; \ |
1968 |
device->unwrapProc = unwrapproc; |
1969 |
|
1970 |
#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \ |
1971 |
- backupproc = device->public.processInputProc; \ |
1972 |
- device->public.processInputProc = oldprocs->processInputProc; \ |
1973 |
+ backupproc = device->public.realInputProc; \ |
1974 |
+ if (device->public.processInputProc == device->public.realInputProc)\ |
1975 |
+ device->public.processInputProc = oldprocs->realInputProc; \ |
1976 |
device->public.realInputProc = oldprocs->realInputProc; \ |
1977 |
device->unwrapProc = oldprocs->unwrapProc; |
1978 |
|
1979 |
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c |
1980 |
index 6edac29..59d34c5 100644 |
1981 |
--- a/xkb/xkbActions.c |
1982 |
+++ b/xkb/xkbActions.c |
1983 |
@@ -50,15 +50,14 @@ xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, |
1984 |
pointer data) |
1985 |
{ |
1986 |
xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(device); |
1987 |
- ProcessInputProc tmp = device->public.processInputProc; |
1988 |
- ProcessInputProc dummy; /* unused, but neede for macro */ |
1989 |
+ ProcessInputProc backupproc; |
1990 |
if(xkbPrivPtr->unwrapProc) |
1991 |
xkbPrivPtr->unwrapProc = NULL; |
1992 |
|
1993 |
- UNWRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, dummy); |
1994 |
+ UNWRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, backupproc); |
1995 |
proc(device,data); |
1996 |
- WRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, |
1997 |
- tmp,xkbUnwrapProc); |
1998 |
+ COND_WRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, |
1999 |
+ backupproc,xkbUnwrapProc); |
2000 |
} |
2001 |
|
2002 |
|
2003 |
-- |
2004 |
1.5.5.1 |
2005 |
|
2006 |
|
2007 |
|
2008 |
|
2009 |
1.1 x11-base/xorg-server/files/1.4.0.90/0033-xfree86-fix-AlwaysCore-handling.-Bug-14256.patch |
2010 |
|
2011 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0033-xfree86-fix-AlwaysCore-handling.-Bug-14256.patch?rev=1.1&view=markup |
2012 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0033-xfree86-fix-AlwaysCore-handling.-Bug-14256.patch?rev=1.1&content-type=text/plain |
2013 |
|
2014 |
Index: 0033-xfree86-fix-AlwaysCore-handling.-Bug-14256.patch |
2015 |
=================================================================== |
2016 |
From ff4006bd5a71d39cc5655679447c5c47a99a2751 Mon Sep 17 00:00:00 2001 |
2017 |
From: Peter Hutterer <peter@××××××××××××.au> |
2018 |
Date: Tue, 29 Jan 2008 10:01:37 +1030 |
2019 |
Subject: [PATCH] xfree86: fix AlwaysCore handling. (Bug #14256) |
2020 |
|
2021 |
Assume AlwaysCore being set by default, just like the other options. |
2022 |
|
2023 |
X.Org Bug 14256 <http://bugs.freedesktop.org/show_bug.cgi?id=14256> |
2024 |
(cherry picked from commit 5b8641a5fdc112c19e78ca2954878712e328d403) |
2025 |
--- |
2026 |
hw/xfree86/common/xf86Xinput.c | 2 +- |
2027 |
1 files changed, 1 insertions(+), 1 deletions(-) |
2028 |
|
2029 |
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c |
2030 |
index b939fb7..ca2be5c 100644 |
2031 |
--- a/hw/xfree86/common/xf86Xinput.c |
2032 |
+++ b/hw/xfree86/common/xf86Xinput.c |
2033 |
@@ -116,7 +116,7 @@ _X_EXPORT void |
2034 |
xf86ProcessCommonOptions(LocalDevicePtr local, |
2035 |
pointer list) |
2036 |
{ |
2037 |
- if (xf86SetBoolOption(list, "AlwaysCore", 0) || |
2038 |
+ if (!xf86SetBoolOption(list, "AlwaysCore", 1) || |
2039 |
!xf86SetBoolOption(list, "SendCoreEvents", 1) || |
2040 |
!xf86SetBoolOption(list, "CorePointer", 1) || |
2041 |
!xf86SetBoolOption(list, "CoreKeyboard", 1)) { |
2042 |
-- |
2043 |
1.5.5.1 |
2044 |
|
2045 |
|
2046 |
|
2047 |
|
2048 |
1.1 x11-base/xorg-server/files/1.4.0.90/0034-Ignore-not-just-block-SIGALRM-around-Popen-Pcl.patch |
2049 |
|
2050 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0034-Ignore-not-just-block-SIGALRM-around-Popen-Pcl.patch?rev=1.1&view=markup |
2051 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0034-Ignore-not-just-block-SIGALRM-around-Popen-Pcl.patch?rev=1.1&content-type=text/plain |
2052 |
|
2053 |
Index: 0034-Ignore-not-just-block-SIGALRM-around-Popen-Pcl.patch |
2054 |
=================================================================== |
2055 |
From 6a5066c2e9e872d4ef85ec70745c34d93580177e Mon Sep 17 00:00:00 2001 |
2056 |
From: Adam Jackson <ajax@×××××××××××××××.net> |
2057 |
Date: Tue, 11 Sep 2007 11:37:06 -0400 |
2058 |
Subject: [PATCH] Ignore - not just block - SIGALRM around Popen()/Pclose(). |
2059 |
|
2060 |
Because our "popen" implementation uses stdio, and because nobody's stdio |
2061 |
library is capable of surviving signals, we need to make absolutely sure |
2062 |
that we hide the SIGALRM from the smart scheduler. Otherwise, when you |
2063 |
open a menu in openoffice, and it recompiles XKB to deal with the |
2064 |
accelerators, and you popen xkbcomp because we suck, then the scheduler |
2065 |
will tell you you're taking forever doing something stupid, and the |
2066 |
wait() code will get confused, and input will hang and your CPU usage |
2067 |
slams to 100%. Down, not across. |
2068 |
--- |
2069 |
os/utils.c | 8 ++++++++ |
2070 |
1 files changed, 8 insertions(+), 0 deletions(-) |
2071 |
|
2072 |
diff --git a/os/utils.c b/os/utils.c |
2073 |
index 3bb7dbe..afcaae4 100644 |
2074 |
--- a/os/utils.c |
2075 |
+++ b/os/utils.c |
2076 |
@@ -1720,6 +1720,8 @@ static struct pid { |
2077 |
int pid; |
2078 |
} *pidlist; |
2079 |
|
2080 |
+static sighandler_t old_alarm = NULL; /* XXX horrible awful hack */ |
2081 |
+ |
2082 |
pointer |
2083 |
Popen(char *command, char *type) |
2084 |
{ |
2085 |
@@ -1741,11 +1743,15 @@ Popen(char *command, char *type) |
2086 |
return NULL; |
2087 |
} |
2088 |
|
2089 |
+ /* Ignore the smart scheduler while this is going on */ |
2090 |
+ old_alarm = signal(SIGALRM, SIG_IGN); |
2091 |
+ |
2092 |
switch (pid = fork()) { |
2093 |
case -1: /* error */ |
2094 |
close(pdes[0]); |
2095 |
close(pdes[1]); |
2096 |
xfree(cur); |
2097 |
+ signal(SIGALRM, old_alarm); |
2098 |
return NULL; |
2099 |
case 0: /* child */ |
2100 |
if (setgid(getgid()) == -1) |
2101 |
@@ -1921,6 +1927,8 @@ Pclose(pointer iop) |
2102 |
/* allow EINTR again */ |
2103 |
OsReleaseSignals (); |
2104 |
|
2105 |
+ signal(SIGALRM, old_alarm); |
2106 |
+ |
2107 |
return pid == -1 ? -1 : pstat; |
2108 |
} |
2109 |
|
2110 |
-- |
2111 |
1.5.5.1 |
2112 |
|
2113 |
|
2114 |
|
2115 |
|
2116 |
1.1 x11-base/xorg-server/files/1.4.0.90/0035-Fix-build-on-FreeBSD-after-Popen-changes.patch |
2117 |
|
2118 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0035-Fix-build-on-FreeBSD-after-Popen-changes.patch?rev=1.1&view=markup |
2119 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0035-Fix-build-on-FreeBSD-after-Popen-changes.patch?rev=1.1&content-type=text/plain |
2120 |
|
2121 |
Index: 0035-Fix-build-on-FreeBSD-after-Popen-changes.patch |
2122 |
=================================================================== |
2123 |
From a02b989c68864a7388553fb96e4fbaf91f941c4a Mon Sep 17 00:00:00 2001 |
2124 |
From: Eric Anholt <eric@××××××.net> |
2125 |
Date: Wed, 12 Sep 2007 13:23:13 +0000 |
2126 |
Subject: [PATCH] Fix build on FreeBSD after Popen changes. |
2127 |
|
2128 |
--- |
2129 |
os/utils.c | 2 +- |
2130 |
1 files changed, 1 insertions(+), 1 deletions(-) |
2131 |
|
2132 |
diff --git a/os/utils.c b/os/utils.c |
2133 |
index afcaae4..144098b 100644 |
2134 |
--- a/os/utils.c |
2135 |
+++ b/os/utils.c |
2136 |
@@ -1720,7 +1720,7 @@ static struct pid { |
2137 |
int pid; |
2138 |
} *pidlist; |
2139 |
|
2140 |
-static sighandler_t old_alarm = NULL; /* XXX horrible awful hack */ |
2141 |
+void (*old_alarm)(int) = NULL; /* XXX horrible awful hack */ |
2142 |
|
2143 |
pointer |
2144 |
Popen(char *command, char *type) |
2145 |
-- |
2146 |
1.5.5.1 |
2147 |
|
2148 |
|
2149 |
|
2150 |
|
2151 |
1.1 x11-base/xorg-server/files/1.4.0.90/0036-So-like-checking-return-codes-of-system-calls-sig.patch |
2152 |
|
2153 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0036-So-like-checking-return-codes-of-system-calls-sig.patch?rev=1.1&view=markup |
2154 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0036-So-like-checking-return-codes-of-system-calls-sig.patch?rev=1.1&content-type=text/plain |
2155 |
|
2156 |
Index: 0036-So-like-checking-return-codes-of-system-calls-sig.patch |
2157 |
=================================================================== |
2158 |
From 0fab9843c7b553bb59d57e68d9c3ea2d754bf809 Mon Sep 17 00:00:00 2001 |
2159 |
From: Ben Byer <bbyer@×××××××××××.com> |
2160 |
Date: Fri, 21 Sep 2007 17:07:36 -0700 |
2161 |
Subject: [PATCH] So, like, checking return codes of system calls (signal, etc) is good. |
2162 |
Also, only restore an old signal handler if one was actually set |
2163 |
(prevents the server from dying on OS X). |
2164 |
|
2165 |
--- |
2166 |
os/utils.c | 24 ++++++++++++++++++++---- |
2167 |
1 files changed, 20 insertions(+), 4 deletions(-) |
2168 |
|
2169 |
diff --git a/os/utils.c b/os/utils.c |
2170 |
index 144098b..36c8dfe 100644 |
2171 |
--- a/os/utils.c |
2172 |
+++ b/os/utils.c |
2173 |
@@ -285,7 +285,8 @@ OsSignal(sig, handler) |
2174 |
sigaddset(&act.sa_mask, sig); |
2175 |
act.sa_flags = 0; |
2176 |
act.sa_handler = handler; |
2177 |
- sigaction(sig, &act, &oact); |
2178 |
+ if (sigaction(sig, &act, &oact)) |
2179 |
+ perror("sigaction"); |
2180 |
return oact.sa_handler; |
2181 |
#endif |
2182 |
} |
2183 |
@@ -1684,6 +1685,10 @@ System(char *command) |
2184 |
|
2185 |
#ifdef SIGCHLD |
2186 |
csig = signal(SIGCHLD, SIG_DFL); |
2187 |
+ if (csig == SIG_ERR) { |
2188 |
+ perror("signal"); |
2189 |
+ return -1; |
2190 |
+ } |
2191 |
#endif |
2192 |
|
2193 |
#ifdef DEBUG |
2194 |
@@ -1708,7 +1713,10 @@ System(char *command) |
2195 |
} |
2196 |
|
2197 |
#ifdef SIGCHLD |
2198 |
- signal(SIGCHLD, csig); |
2199 |
+ if (signal(SIGCHLD, csig) == SIG_ERR) { |
2200 |
+ perror("signal"); |
2201 |
+ return -1; |
2202 |
+ } |
2203 |
#endif |
2204 |
|
2205 |
return p == -1 ? -1 : status; |
2206 |
@@ -1745,13 +1753,18 @@ Popen(char *command, char *type) |
2207 |
|
2208 |
/* Ignore the smart scheduler while this is going on */ |
2209 |
old_alarm = signal(SIGALRM, SIG_IGN); |
2210 |
+ if (old_alarm == SIG_ERR) { |
2211 |
+ perror("signal"); |
2212 |
+ return NULL; |
2213 |
+ } |
2214 |
|
2215 |
switch (pid = fork()) { |
2216 |
case -1: /* error */ |
2217 |
close(pdes[0]); |
2218 |
close(pdes[1]); |
2219 |
xfree(cur); |
2220 |
- signal(SIGALRM, old_alarm); |
2221 |
+ if (signal(SIGALRM, old_alarm) == SIG_ERR) |
2222 |
+ perror("signal"); |
2223 |
return NULL; |
2224 |
case 0: /* child */ |
2225 |
if (setgid(getgid()) == -1) |
2226 |
@@ -1927,7 +1940,10 @@ Pclose(pointer iop) |
2227 |
/* allow EINTR again */ |
2228 |
OsReleaseSignals (); |
2229 |
|
2230 |
- signal(SIGALRM, old_alarm); |
2231 |
+ if (old_alarm && signal(SIGALRM, old_alarm) == SIG_ERR) { |
2232 |
+ perror("signal"); |
2233 |
+ return -1; |
2234 |
+ } |
2235 |
|
2236 |
return pid == -1 ? -1 : pstat; |
2237 |
} |
2238 |
-- |
2239 |
1.5.5.1 |
2240 |
|
2241 |
|
2242 |
|
2243 |
|
2244 |
1.1 x11-base/xorg-server/files/1.4.0.90/0037-Check-for-sys-sdt.h-as-well-when-determining-to-en.patch |
2245 |
|
2246 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0037-Check-for-sys-sdt.h-as-well-when-determining-to-en.patch?rev=1.1&view=markup |
2247 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0037-Check-for-sys-sdt.h-as-well-when-determining-to-en.patch?rev=1.1&content-type=text/plain |
2248 |
|
2249 |
Index: 0037-Check-for-sys-sdt.h-as-well-when-determining-to-en.patch |
2250 |
=================================================================== |
2251 |
From b95befdfd2c9bcb6b0cd896f2b8dfaaeb129dbff Mon Sep 17 00:00:00 2001 |
2252 |
From: Alan Coopersmith <alan.coopersmith@×××.com> |
2253 |
Date: Fri, 7 Dec 2007 17:28:37 -0800 |
2254 |
Subject: [PATCH] Check for <sys/sdt.h> as well when determining to enable dtrace probes |
2255 |
|
2256 |
Avoids auto-detecting dtrace is present on systems with the ISDN trace tool |
2257 |
named dtrace installed, but not the dynamic tracing facility named dtrace |
2258 |
--- |
2259 |
configure.ac | 7 +++++++ |
2260 |
1 files changed, 7 insertions(+), 0 deletions(-) |
2261 |
|
2262 |
diff --git a/configure.ac b/configure.ac |
2263 |
index 4841d26..c73f4a7 100644 |
2264 |
--- a/configure.ac |
2265 |
+++ b/configure.ac |
2266 |
@@ -66,6 +66,8 @@ AC_SYS_LARGEFILE |
2267 |
XORG_PROG_RAWCPP |
2268 |
|
2269 |
dnl Check for dtrace program (needed to build Xserver dtrace probes) |
2270 |
+dnl Also checks for <sys/sdt.h>, since some Linux distros have an |
2271 |
+dnl ISDN trace program named dtrace |
2272 |
AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH], |
2273 |
[Enable dtrace probes (default: enabled if dtrace found)]), |
2274 |
[WDTRACE=$withval], [WDTRACE=auto]) |
2275 |
@@ -76,6 +78,11 @@ if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then |
2276 |
AC_MSG_FAILURE([dtrace requested but not found]) |
2277 |
fi |
2278 |
WDTRACE="no" |
2279 |
+ else |
2280 |
+ AC_CHECK_HEADER(sys/sdt.h, [HAS_SDT_H="yes"], [HAS_SDT_H="no"]) |
2281 |
+ if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then |
2282 |
+ WDTRACE="no" |
2283 |
+ fi |
2284 |
fi |
2285 |
fi |
2286 |
if test "x$WDTRACE" != "xno" ; then |
2287 |
-- |
2288 |
1.5.5.1 |
2289 |
|
2290 |
|
2291 |
|
2292 |
|
2293 |
1.1 x11-base/xorg-server/files/1.4.0.90/0038-dix-Always-add-valuator-information-if-present.patch |
2294 |
|
2295 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0038-dix-Always-add-valuator-information-if-present.patch?rev=1.1&view=markup |
2296 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0038-dix-Always-add-valuator-information-if-present.patch?rev=1.1&content-type=text/plain |
2297 |
|
2298 |
Index: 0038-dix-Always-add-valuator-information-if-present.patch |
2299 |
=================================================================== |
2300 |
From 7fa7031cfa9145f55881b87bc39f6e2c8a49ff76 Mon Sep 17 00:00:00 2001 |
2301 |
From: =?utf-8?q?Magnus=20Vigerl=C3=B6f?= <Magnus.Vigerlof@××××.se> |
2302 |
Date: Sat, 2 Feb 2008 22:44:31 +0100 |
2303 |
Subject: [PATCH] dix: Always add valuator information if present |
2304 |
|
2305 |
Send valuator information for all event types, not only for |
2306 |
MotionEvents and absolute button events. |
2307 |
(cherry picked from commit 12e532403210c15a25200ef448bfe9701735ab20) |
2308 |
--- |
2309 |
dix/getevents.c | 7 ++----- |
2310 |
1 files changed, 2 insertions(+), 5 deletions(-) |
2311 |
|
2312 |
diff --git a/dix/getevents.c b/dix/getevents.c |
2313 |
index b7ba69b..36c1bcf 100644 |
2314 |
--- a/dix/getevents.c |
2315 |
+++ b/dix/getevents.c |
2316 |
@@ -523,9 +523,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2317 |
int num_events = 0, final_valuator = 0; |
2318 |
CARD32 ms = 0; |
2319 |
deviceKeyButtonPointer *kbp = NULL; |
2320 |
- /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies |
2321 |
- * with DeviceValuators. */ |
2322 |
- Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); |
2323 |
DeviceIntPtr cp = inputInfo.pointer; |
2324 |
int x = 0, y = 0; |
2325 |
Bool coreOnly = (pDev == inputInfo.pointer); |
2326 |
@@ -551,7 +548,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2327 |
return 0; |
2328 |
|
2329 |
/* Do we need to send a DeviceValuator event? */ |
2330 |
- if (!coreOnly && sendValuators) { |
2331 |
+ if (!coreOnly && num_valuators) { |
2332 |
if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) |
2333 |
num_valuators = MAX_VALUATOR_EVENTS * 6; |
2334 |
num_events += ((num_valuators - 1) / 6) + 1; |
2335 |
@@ -682,7 +679,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2336 |
kbp->root_y = y; |
2337 |
|
2338 |
events++; |
2339 |
- if (sendValuators) { |
2340 |
+ if (num_valuators) { |
2341 |
kbp->deviceid |= MORE_EVENTS; |
2342 |
clipValuators(pDev, first_valuator, num_valuators, valuators); |
2343 |
events = getValuatorEvents(events, pDev, first_valuator, |
2344 |
-- |
2345 |
1.5.5.1 |
2346 |
|
2347 |
|
2348 |
|
2349 |
|
2350 |
1.1 x11-base/xorg-server/files/1.4.0.90/0039-Bug-10324-dix-Allow-arbitrary-value-ranges-in-Ge.patch |
2351 |
|
2352 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0039-Bug-10324-dix-Allow-arbitrary-value-ranges-in-Ge.patch?rev=1.1&view=markup |
2353 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0039-Bug-10324-dix-Allow-arbitrary-value-ranges-in-Ge.patch?rev=1.1&content-type=text/plain |
2354 |
|
2355 |
Index: 0039-Bug-10324-dix-Allow-arbitrary-value-ranges-in-Ge.patch |
2356 |
=================================================================== |
2357 |
From 1d79ba8193e9584370ffaaa8dffb4db604125dea Mon Sep 17 00:00:00 2001 |
2358 |
From: =?utf-8?q?Magnus=20Vigerl=C3=B6f?= <Magnus.Vigerlof@××××.se> |
2359 |
Date: Sat, 2 Feb 2008 22:45:31 +0100 |
2360 |
Subject: [PATCH] Bug # 10324: dix: Allow arbitrary value ranges in GetPointerEvents |
2361 |
|
2362 |
Don't use a possitive value as a marker for if a max-value |
2363 |
is defined on the valuators. Use the existence of a valid |
2364 |
value range instead. This will also make it possible to |
2365 |
define arbitrary start and end-values for min and max as |
2366 |
long as min < max. |
2367 |
(cherry picked from commit f04c0838699f1a733735838e74cfbb1677b15dc4) |
2368 |
--- |
2369 |
dix/getevents.c | 11 +++++++---- |
2370 |
1 files changed, 7 insertions(+), 4 deletions(-) |
2371 |
|
2372 |
diff --git a/dix/getevents.c b/dix/getevents.c |
2373 |
index 36c1bcf..8595eaf 100644 |
2374 |
--- a/dix/getevents.c |
2375 |
+++ b/dix/getevents.c |
2376 |
@@ -306,10 +306,13 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val) |
2377 |
{ |
2378 |
AxisInfoPtr axes = pDev->valuator->axes + axisNum; |
2379 |
|
2380 |
- if (*val < axes->min_value) |
2381 |
- *val = axes->min_value; |
2382 |
- if (axes->max_value >= 0 && *val > axes->max_value) |
2383 |
- *val = axes->max_value; |
2384 |
+ /* No clipping if the value-range <= 0 */ |
2385 |
+ if(axes->min_value < axes->min_value) { |
2386 |
+ if (*val < axes->min_value) |
2387 |
+ *val = axes->min_value; |
2388 |
+ if (*val > axes->max_value) |
2389 |
+ *val = axes->max_value; |
2390 |
+ } |
2391 |
} |
2392 |
|
2393 |
/** |
2394 |
-- |
2395 |
1.5.5.1 |
2396 |
|
2397 |
|
2398 |
|
2399 |
|
2400 |
1.1 x11-base/xorg-server/files/1.4.0.90/0040-Bug-10324-dix-Add-scaling-of-X-and-Y-on-the-repo.patch |
2401 |
|
2402 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0040-Bug-10324-dix-Add-scaling-of-X-and-Y-on-the-repo.patch?rev=1.1&view=markup |
2403 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0040-Bug-10324-dix-Add-scaling-of-X-and-Y-on-the-repo.patch?rev=1.1&content-type=text/plain |
2404 |
|
2405 |
Index: 0040-Bug-10324-dix-Add-scaling-of-X-and-Y-on-the-repo.patch |
2406 |
=================================================================== |
2407 |
From b51ca35a7578b64190f663dc825d7fb551b92e73 Mon Sep 17 00:00:00 2001 |
2408 |
From: =?utf-8?q?Magnus=20Vigerl=C3=B6f?= <Magnus.Vigerlof@××××.se> |
2409 |
Date: Sat, 2 Feb 2008 22:57:32 +0100 |
2410 |
Subject: [PATCH] Bug # 10324: dix: Add scaling of X and Y on the reported pointer-events |
2411 |
|
2412 |
Restore the rescaling code for x and y axis when generating |
2413 |
motion events. |
2414 |
(cherry picked from commit d9e23c4ff1607a62164b34717ef9afd352ce2b94) |
2415 |
--- |
2416 |
dix/getevents.c | 97 +++++++++++++++++++++++++++++++++++++++++++------------ |
2417 |
1 files changed, 76 insertions(+), 21 deletions(-) |
2418 |
|
2419 |
diff --git a/dix/getevents.c b/dix/getevents.c |
2420 |
index 8595eaf..e0bc326 100644 |
2421 |
--- a/dix/getevents.c |
2422 |
+++ b/dix/getevents.c |
2423 |
@@ -529,6 +529,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2424 |
DeviceIntPtr cp = inputInfo.pointer; |
2425 |
int x = 0, y = 0; |
2426 |
Bool coreOnly = (pDev == inputInfo.pointer); |
2427 |
+ ScreenPtr scr = miPointerGetScreen(pDev); |
2428 |
|
2429 |
/* Sanity checks. */ |
2430 |
if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) |
2431 |
@@ -572,20 +573,39 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2432 |
x = valuators[0]; |
2433 |
} |
2434 |
else { |
2435 |
- if (pDev->coreEvents) |
2436 |
- x = cp->valuator->lastx; |
2437 |
- else |
2438 |
- x = pDev->valuator->lastx; |
2439 |
+ /* If we're sending core events but didn't provide a value, |
2440 |
+ * translate the core value (but use the device coord if |
2441 |
+ * it translates to the same coord to preserve sub-pixel |
2442 |
+ * coord information). If we're not sending core events use |
2443 |
+ * whatever value we have */ |
2444 |
+ x = pDev->valuator->lastx; |
2445 |
+ if(pDev->coreEvents) { |
2446 |
+ int min = pDev->valuator->axes[0].min_value; |
2447 |
+ int max = pDev->valuator->axes[0].max_value; |
2448 |
+ if(min < max) { |
2449 |
+ if((int)((float)(x-min)*scr->width/(max-min+1)) != cp->valuator->lastx) |
2450 |
+ x = (int)((float)(cp->valuator->lastx)*(max-min+1)/scr->width)+min; |
2451 |
+ } |
2452 |
+ else |
2453 |
+ x = cp->valuator->lastx; |
2454 |
+ } |
2455 |
} |
2456 |
|
2457 |
if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { |
2458 |
y = valuators[1 - first_valuator]; |
2459 |
} |
2460 |
else { |
2461 |
- if (pDev->coreEvents) |
2462 |
- y = cp->valuator->lasty; |
2463 |
- else |
2464 |
- y = pDev->valuator->lasty; |
2465 |
+ y = pDev->valuator->lasty; |
2466 |
+ if(pDev->coreEvents) { |
2467 |
+ int min = pDev->valuator->axes[1].min_value; |
2468 |
+ int max = pDev->valuator->axes[1].max_value; |
2469 |
+ if(min < max) { |
2470 |
+ if((int)((float)(y-min)*scr->height/(max-min+1)) != cp->valuator->lasty) |
2471 |
+ y = (int)((float)(cp->valuator->lasty)*(max-min+1)/scr->height)+min; |
2472 |
+ } |
2473 |
+ else |
2474 |
+ y = cp->valuator->lasty; |
2475 |
+ } |
2476 |
} |
2477 |
} |
2478 |
else { |
2479 |
@@ -594,15 +614,35 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2480 |
valuators); |
2481 |
|
2482 |
if (pDev->coreEvents) { |
2483 |
- if (first_valuator == 0 && num_valuators >= 1) |
2484 |
- x = cp->valuator->lastx + valuators[0]; |
2485 |
+ /* Get and convert the core pointer coordinate space into |
2486 |
+ * device coordinates. Use the device coords if it translates |
2487 |
+ * into the same position as the core to preserve relative sub- |
2488 |
+ * pixel movements from the device. */ |
2489 |
+ int min = pDev->valuator->axes[0].min_value; |
2490 |
+ int max = pDev->valuator->axes[0].max_value; |
2491 |
+ if(min < max) { |
2492 |
+ x = pDev->valuator->lastx; |
2493 |
+ if((int)((float)(x-min)*scr->width/(max-min+1)) != cp->valuator->lastx) |
2494 |
+ x = (int)((float)(cp->valuator->lastx)*(max-min+1)/scr->width)+min; |
2495 |
+ } |
2496 |
else |
2497 |
x = cp->valuator->lastx; |
2498 |
|
2499 |
- if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) |
2500 |
- y = cp->valuator->lasty + valuators[1 - first_valuator]; |
2501 |
+ min = pDev->valuator->axes[1].min_value; |
2502 |
+ max = pDev->valuator->axes[1].max_value; |
2503 |
+ if(min < max) { |
2504 |
+ y = pDev->valuator->lasty; |
2505 |
+ if((int)((float)(y-min)*scr->height/(max-min+1)) != cp->valuator->lasty) |
2506 |
+ y = (int)((float)(cp->valuator->lasty)*(max-min+1)/scr->height)+min; |
2507 |
+ } |
2508 |
else |
2509 |
y = cp->valuator->lasty; |
2510 |
+ |
2511 |
+ /* Add relative movement */ |
2512 |
+ if (first_valuator == 0 && num_valuators >= 1) |
2513 |
+ x += valuators[0]; |
2514 |
+ if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) |
2515 |
+ y += valuators[1 - first_valuator]; |
2516 |
} |
2517 |
else { |
2518 |
if (first_valuator == 0 && num_valuators >= 1) |
2519 |
@@ -621,11 +661,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2520 |
clipAxis(pDev, 0, &x); |
2521 |
clipAxis(pDev, 1, &y); |
2522 |
|
2523 |
- /* This takes care of crossing screens for us, as well as clipping |
2524 |
- * to the current screen. Right now, we only have one history buffer, |
2525 |
- * so we don't set this for both the device and core.*/ |
2526 |
- miPointerSetPosition(pDev, &x, &y, ms); |
2527 |
- |
2528 |
/* Drop x and y back into the valuators list, if they were originally |
2529 |
* present. */ |
2530 |
if (first_valuator == 0 && num_valuators >= 1) |
2531 |
@@ -635,12 +670,32 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2532 |
|
2533 |
updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); |
2534 |
|
2535 |
+ pDev->valuator->lastx = x; |
2536 |
+ pDev->valuator->lasty = y; |
2537 |
+ /* Convert the dev coord back to screen coord if we're |
2538 |
+ * sending core events */ |
2539 |
+ if (pDev->coreEvents) { |
2540 |
+ int min = pDev->valuator->axes[0].min_value; |
2541 |
+ int max = pDev->valuator->axes[0].max_value; |
2542 |
+ if(min < max) |
2543 |
+ x = (int)((float)(x-min)*scr->width/(max-min+1)); |
2544 |
+ cp->valuator->lastx = x; |
2545 |
+ min = pDev->valuator->axes[1].min_value; |
2546 |
+ max = pDev->valuator->axes[1].max_value; |
2547 |
+ if(min < max) |
2548 |
+ y = (int)((float)(y-min)*scr->height/(max-min+1)); |
2549 |
+ cp->valuator->lasty = y; |
2550 |
+ } |
2551 |
+ |
2552 |
+ /* This takes care of crossing screens for us, as well as clipping |
2553 |
+ * to the current screen. Right now, we only have one history buffer, |
2554 |
+ * so we don't set this for both the device and core.*/ |
2555 |
+ miPointerSetPosition(pDev, &x, &y, ms); |
2556 |
+ |
2557 |
if (pDev->coreEvents) { |
2558 |
cp->valuator->lastx = x; |
2559 |
cp->valuator->lasty = y; |
2560 |
} |
2561 |
- pDev->valuator->lastx = x; |
2562 |
- pDev->valuator->lasty = y; |
2563 |
|
2564 |
/* for some reason inputInfo.pointer does not have coreEvents set */ |
2565 |
if (coreOnly || pDev->coreEvents) { |
2566 |
@@ -678,8 +733,8 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2567 |
kbp->detail = pDev->button->map[buttons]; |
2568 |
} |
2569 |
|
2570 |
- kbp->root_x = x; |
2571 |
- kbp->root_y = y; |
2572 |
+ kbp->root_x = pDev->valuator->lastx; |
2573 |
+ kbp->root_y = pDev->valuator->lasty; |
2574 |
|
2575 |
events++; |
2576 |
if (num_valuators) { |
2577 |
-- |
2578 |
1.5.5.1 |
2579 |
|
2580 |
|
2581 |
|
2582 |
|
2583 |
1.1 x11-base/xorg-server/files/1.4.0.90/0041-dix-Skip-call-to-clipAxis-for-relative-core-events.patch |
2584 |
|
2585 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0041-dix-Skip-call-to-clipAxis-for-relative-core-events.patch?rev=1.1&view=markup |
2586 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0041-dix-Skip-call-to-clipAxis-for-relative-core-events.patch?rev=1.1&content-type=text/plain |
2587 |
|
2588 |
Index: 0041-dix-Skip-call-to-clipAxis-for-relative-core-events.patch |
2589 |
=================================================================== |
2590 |
From a68d0ef4a65bcd52c52ba54e6925082a9145fad3 Mon Sep 17 00:00:00 2001 |
2591 |
From: =?utf-8?q?Magnus=20Vigerl=C3=B6f?= <Magnus.Vigerlof@××××.se> |
2592 |
Date: Sat, 2 Feb 2008 23:03:51 +0100 |
2593 |
Subject: [PATCH] dix: Skip call to clipAxis for relative core-events |
2594 |
|
2595 |
Relative events that generates both core and extention |
2596 |
events will have its axis cliped and screen changed by |
2597 |
miPointerSetPosition when the events are processed. For |
2598 |
absolute and non core-generating relative events the |
2599 |
axis must be clipped if we shouldn't end up completely |
2600 |
outside the defined ranges (if any). |
2601 |
(cherry picked from commit a0284d577aabea8406b72dd63773e341430ebe56) |
2602 |
--- |
2603 |
dix/getevents.c | 44 +++++++++++++++++++++++++++++++++----------- |
2604 |
1 files changed, 33 insertions(+), 11 deletions(-) |
2605 |
|
2606 |
diff --git a/dix/getevents.c b/dix/getevents.c |
2607 |
index e0bc326..c33371b 100644 |
2608 |
--- a/dix/getevents.c |
2609 |
+++ b/dix/getevents.c |
2610 |
@@ -607,6 +607,10 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2611 |
y = cp->valuator->lasty; |
2612 |
} |
2613 |
} |
2614 |
+ |
2615 |
+ /* Clip both x and y to the defined limits (usually co-ord space limit). */ |
2616 |
+ clipAxis(pDev, 0, &x); |
2617 |
+ clipAxis(pDev, 1, &y); |
2618 |
} |
2619 |
else { |
2620 |
if (flags & POINTER_ACCELERATE) |
2621 |
@@ -645,22 +649,22 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2622 |
y += valuators[1 - first_valuator]; |
2623 |
} |
2624 |
else { |
2625 |
+ x = pDev->valuator->lastx; |
2626 |
+ y = pDev->valuator->lasty; |
2627 |
if (first_valuator == 0 && num_valuators >= 1) |
2628 |
- x = pDev->valuator->lastx + valuators[0]; |
2629 |
- else |
2630 |
- x = pDev->valuator->lastx; |
2631 |
- |
2632 |
+ x += valuators[0]; |
2633 |
if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) |
2634 |
- y = pDev->valuator->lasty + valuators[1 - first_valuator]; |
2635 |
- else |
2636 |
- y = pDev->valuator->lasty; |
2637 |
+ y += valuators[1 - first_valuator]; |
2638 |
+ |
2639 |
+ if(!coreOnly) { |
2640 |
+ /* Since we're not sending core-events we must clip both x and y |
2641 |
+ * to the defined limits so we don't run outside the box. */ |
2642 |
+ clipAxis(pDev, 0, &x); |
2643 |
+ clipAxis(pDev, 1, &y); |
2644 |
+ } |
2645 |
} |
2646 |
} |
2647 |
|
2648 |
- /* Clip both x and y to the defined limits (usually co-ord space limit). */ |
2649 |
- clipAxis(pDev, 0, &x); |
2650 |
- clipAxis(pDev, 1, &y); |
2651 |
- |
2652 |
/* Drop x and y back into the valuators list, if they were originally |
2653 |
* present. */ |
2654 |
if (first_valuator == 0 && num_valuators >= 1) |
2655 |
@@ -693,6 +697,24 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2656 |
miPointerSetPosition(pDev, &x, &y, ms); |
2657 |
|
2658 |
if (pDev->coreEvents) { |
2659 |
+ /* miPointerSetPosition may have changed screen */ |
2660 |
+ scr = miPointerGetScreen(pDev); |
2661 |
+ if(x != cp->valuator->lastx) { |
2662 |
+ int min = pDev->valuator->axes[0].min_value; |
2663 |
+ int max = pDev->valuator->axes[0].max_value; |
2664 |
+ cp->valuator->lastx = pDev->valuator->lastx = x; |
2665 |
+ if(min < max) |
2666 |
+ pDev->valuator->lastx = (int)((float)(x)*(max-min+1)/scr->width)+min; |
2667 |
+ } |
2668 |
+ if(y != cp->valuator->lasty) { |
2669 |
+ int min = pDev->valuator->axes[1].min_value; |
2670 |
+ int max = pDev->valuator->axes[1].max_value; |
2671 |
+ cp->valuator->lasty = pDev->valuator->lasty = y; |
2672 |
+ if(min < max) |
2673 |
+ pDev->valuator->lasty = (int)((float)(y)*(max-min+1)/scr->height)+min; |
2674 |
+ } |
2675 |
+ } |
2676 |
+ else if (coreOnly) { |
2677 |
cp->valuator->lastx = x; |
2678 |
cp->valuator->lasty = y; |
2679 |
} |
2680 |
-- |
2681 |
1.5.5.1 |
2682 |
|
2683 |
|
2684 |
|
2685 |
|
2686 |
1.1 x11-base/xorg-server/files/1.4.0.90/0042-dix-Move-motion-history-update-until-after-screen-c.patch |
2687 |
|
2688 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0042-dix-Move-motion-history-update-until-after-screen-c.patch?rev=1.1&view=markup |
2689 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0042-dix-Move-motion-history-update-until-after-screen-c.patch?rev=1.1&content-type=text/plain |
2690 |
|
2691 |
Index: 0042-dix-Move-motion-history-update-until-after-screen-c.patch |
2692 |
=================================================================== |
2693 |
From b1145a6b428db2037c79ffb36116e7183f30829f Mon Sep 17 00:00:00 2001 |
2694 |
From: =?utf-8?q?Magnus=20Vigerl=C3=B6f?= <Magnus.Vigerlof@××××.se> |
2695 |
Date: Sat, 2 Feb 2008 23:04:46 +0100 |
2696 |
Subject: [PATCH] dix: Move motion history update until after screen crossing and clipping |
2697 |
|
2698 |
Cross screen and clip the coordinates before updating the motion history |
2699 |
so that it will have the same contents as the events that are reported. |
2700 |
(cherry picked from commit a56ef7aaa4b6ac13c8181f68fc7dad3ca89e6973) |
2701 |
--- |
2702 |
dix/getevents.c | 18 +++++++++--------- |
2703 |
1 files changed, 9 insertions(+), 9 deletions(-) |
2704 |
|
2705 |
diff --git a/dix/getevents.c b/dix/getevents.c |
2706 |
index c33371b..d0fe2db 100644 |
2707 |
--- a/dix/getevents.c |
2708 |
+++ b/dix/getevents.c |
2709 |
@@ -665,15 +665,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2710 |
} |
2711 |
} |
2712 |
|
2713 |
- /* Drop x and y back into the valuators list, if they were originally |
2714 |
- * present. */ |
2715 |
- if (first_valuator == 0 && num_valuators >= 1) |
2716 |
- valuators[0] = x; |
2717 |
- if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) |
2718 |
- valuators[1 - first_valuator] = y; |
2719 |
- |
2720 |
- updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); |
2721 |
- |
2722 |
pDev->valuator->lastx = x; |
2723 |
pDev->valuator->lasty = y; |
2724 |
/* Convert the dev coord back to screen coord if we're |
2725 |
@@ -719,6 +710,15 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, |
2726 |
cp->valuator->lasty = y; |
2727 |
} |
2728 |
|
2729 |
+ /* Drop x and y back into the valuators list, if they were originally |
2730 |
+ * present. */ |
2731 |
+ if (first_valuator == 0 && num_valuators >= 1) |
2732 |
+ valuators[0] = pDev->valuator->lastx; |
2733 |
+ if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) |
2734 |
+ valuators[1 - first_valuator] = pDev->valuator->lasty; |
2735 |
+ |
2736 |
+ updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); |
2737 |
+ |
2738 |
/* for some reason inputInfo.pointer does not have coreEvents set */ |
2739 |
if (coreOnly || pDev->coreEvents) { |
2740 |
events->u.u.type = type; |
2741 |
-- |
2742 |
1.5.5.1 |
2743 |
|
2744 |
|
2745 |
|
2746 |
|
2747 |
1.1 x11-base/xorg-server/files/1.4.0.90/0043-XKB-Actually-explain-keymap-failures.patch |
2748 |
|
2749 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0043-XKB-Actually-explain-keymap-failures.patch?rev=1.1&view=markup |
2750 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-base/xorg-server/files/1.4.0.90/0043-XKB-Actually-explain-keymap-failures.patch?rev=1.1&content-type=text/plain |
2751 |
|
2752 |
Index: 0043-XKB-Actually-explain-keymap-failures.patch |
2753 |
=================================================================== |
2754 |
From 104048501f37b139d4113562ef1711978cc76018 Mon Sep 17 00:00:00 2001 |
2755 |
From: Daniel Stone <daniel@×××××××××.org> |
2756 |
Date: Wed, 7 May 2008 23:11:31 +0300 |
2757 |
Subject: [PATCH] XKB: Actually explain keymap failures |
2758 |
|
2759 |
When something went wrong building a keymap, try to explain to the user |
2760 |
what it actually was, instead of the dreaded 'Failed to load XKB keymap' |
2761 |
catch-all. |
2762 |
(cherry picked from commit cf20df39cc78203d17b99223908af388ecbf7d0e) |
2763 |
|
2764 |
Conflicts: |
2765 |
xkb/ddxLoad.c |
2766 |
--- |
2767 |
xkb/ddxLoad.c | 69 ++++++++++++++++++++++++++++----------------------------- |
2768 |
1 files changed, 34 insertions(+), 35 deletions(-) |
2769 |
|
2770 |
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c |
2771 |
index d79ae7a..ea9c3ff 100644 |
2772 |
--- a/xkb/ddxLoad.c |
2773 |
+++ b/xkb/ddxLoad.c |
2774 |
@@ -385,24 +385,20 @@ char tmpname[PATH_MAX]; |
2775 |
xfree (buf); |
2776 |
return True; |
2777 |
} |
2778 |
-#ifdef DEBUG |
2779 |
else |
2780 |
- ErrorF("Error compiling keymap (%s)\n",keymap); |
2781 |
-#endif |
2782 |
+ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap); |
2783 |
#ifdef WIN32 |
2784 |
/* remove the temporary file */ |
2785 |
unlink(tmpname); |
2786 |
#endif |
2787 |
} |
2788 |
-#ifdef DEBUG |
2789 |
else { |
2790 |
#ifndef WIN32 |
2791 |
- ErrorF("Could not invoke keymap compiler\n"); |
2792 |
+ LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp\n"); |
2793 |
#else |
2794 |
- ErrorF("Could not open file %s\n", tmpname); |
2795 |
+ LogMessage(X_ERROR, "Could not open file %s\n", tmpname); |
2796 |
#endif |
2797 |
} |
2798 |
-#endif |
2799 |
if (nameRtrn) |
2800 |
nameRtrn[0]= '\0'; |
2801 |
if (buf != NULL) |
2802 |
@@ -477,17 +473,14 @@ unsigned missing; |
2803 |
return 0; |
2804 |
} |
2805 |
else if (!XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)) { |
2806 |
-#ifdef NOISY |
2807 |
- ErrorF("Couldn't compile keymap file\n"); |
2808 |
-#endif |
2809 |
+ LogMessage(X_ERROR, "Couldn't compile keymap file %s\n", |
2810 |
+ names->keymap); |
2811 |
return 0; |
2812 |
} |
2813 |
} |
2814 |
else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need, |
2815 |
- nameRtrn,nameRtrnLen)){ |
2816 |
-#ifdef NOISY |
2817 |
- ErrorF("Couldn't compile keymap file\n"); |
2818 |
-#endif |
2819 |
+ nameRtrn,nameRtrnLen)){ |
2820 |
+ LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n"); |
2821 |
return 0; |
2822 |
} |
2823 |
file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX); |
2824 |
@@ -502,11 +495,9 @@ unsigned missing; |
2825 |
(void) unlink (fileName); |
2826 |
return 0; |
2827 |
} |
2828 |
-#ifdef DEBUG |
2829 |
- else if (xkbDebugFlags) { |
2830 |
- ErrorF("Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined); |
2831 |
+ else { |
2832 |
+ DebugF("XKB: Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined); |
2833 |
} |
2834 |
-#endif |
2835 |
fclose(file); |
2836 |
(void) unlink (fileName); |
2837 |
return (need|want)&(~missing); |
2838 |
@@ -525,32 +516,40 @@ XkbRF_RulesPtr rules; |
2839 |
|
2840 |
if (!rules_name) |
2841 |
return False; |
2842 |
- if (XkbBaseDirectory==NULL) { |
2843 |
- if (strlen(rules_name)+7 > PATH_MAX) |
2844 |
- return False; |
2845 |
- sprintf(buf,"rules/%s",rules_name); |
2846 |
- } |
2847 |
- else { |
2848 |
- if (strlen(XkbBaseDirectory)+strlen(rules_name)+8 > PATH_MAX) |
2849 |
- return False; |
2850 |
- sprintf(buf,"%s/rules/%s",XkbBaseDirectory,rules_name); |
2851 |
+ |
2852 |
+ if (strlen(XkbBaseDirectory) + strlen(rules_name) + 8 > PATH_MAX) { |
2853 |
+ LogMessage(X_ERROR, "XKB: Rules name is too long\n"); |
2854 |
+ return False; |
2855 |
} |
2856 |
- if ((file= fopen(buf,"r"))==NULL) |
2857 |
+ sprintf(buf,"%s/rules/%s", XkbBaseDirectory, rules_name); |
2858 |
+ |
2859 |
+ file = fopen(buf, "r"); |
2860 |
+ if (!file) { |
2861 |
+ LogMessage(X_ERROR, "XKB: Couldn't open rules file %s\n", file); |
2862 |
return False; |
2863 |
- if ((rules= XkbRF_Create(0,0))==NULL) { |
2864 |
+ } |
2865 |
+ |
2866 |
+ rules = XkbRF_Create(0, 0); |
2867 |
+ if (!rules) { |
2868 |
+ LogMessage(X_ERROR, "XKB: Couldn't create rules struct\n"); |
2869 |
fclose(file); |
2870 |
return False; |
2871 |
} |
2872 |
- if (!XkbRF_LoadRules(file,rules)) { |
2873 |
+ |
2874 |
+ if (!XkbRF_LoadRules(file, rules)) { |
2875 |
+ LogMessage(X_ERROR, "XKB: Couldn't parse rules file %s\n", rules_name); |
2876 |
fclose(file); |
2877 |
XkbRF_Free(rules,True); |
2878 |
return False; |
2879 |
} |
2880 |
- bzero((char *)names,sizeof(XkbComponentNamesRec)); |
2881 |
- complete= XkbRF_GetComponents(rules,defs,names); |
2882 |
+ |
2883 |
+ memset(names, 0, sizeof(*names)); |
2884 |
+ complete = XkbRF_GetComponents(rules,defs,names); |
2885 |
fclose(file); |
2886 |
- XkbRF_Free(rules,True); |
2887 |
- return complete; |
2888 |
-} |
2889 |
+ XkbRF_Free(rules, True); |
2890 |
|
2891 |
+ if (!complete) |
2892 |
+ LogMessage(X_ERROR, "XKB: Rules returned no components\n"); |
2893 |
|
2894 |
+ return complete; |
2895 |
+} |
2896 |
-- |
2897 |
1.5.5.1 |
2898 |
|
2899 |
|
2900 |
|
2901 |
|
2902 |
-- |
2903 |
gentoo-commits@l.g.o mailing list |