Commit Graph

3726 Commits

Author SHA1 Message Date
Matthieu Herrb
d244c8272e Fix for CVE-2007-6427 - Xinput extension memory corruption. 2008-01-17 17:02:04 +01:00
Matthieu Herrb
4848d49d05 Fix for CVE-2007-6428 - TOG-cup extension memory corruption. 2008-01-17 17:00:22 +01:00
Matthieu Herrb
59a3b83922 Fix for CVE-2007-5760 - XFree86 Misc extension out of bounds array index 2008-01-17 17:00:06 +01:00
Daniel Stone
636aa9e7be Xephyr: One-time keyboard leak fix
Don't leak the originally-allocated keysym map.
(cherry picked from commit e85130c85f)
2008-01-17 18:43:30 +11:00
Daniel Stone
8a3acd3ec4 XKB: XkbCopyKeymap: Don't leak all the sections
Previously, we'd just keep num_sections at 0, which would break the
geometry and lead us to leak sections.  Don't do that.
(cherry picked from commit 0137b0394a)
2008-01-17 18:43:27 +11:00
Daniel Stone
02e805f0ff OS: IO: Zero out client buffers
For alignment reasons, we can write out uninitialised bytes, so allocate
the whole thing with xcalloc.
(cherry picked from commit b99a43dfe9)
2008-01-17 18:43:24 +11:00
Peter Hutterer
60144ac814 include: never overwrite realInputProc with enqueueInputProc. Bug #13511
In some cases (triggered by a key repeat during a sync grab) XKB unwrapping
can overwrite the device's realInputProc with the enqueueInputProc. When the
grab is released and the events are replayed, we end up in an infinite loop.
Each event is replayed and in replaying pushed to the end of the queue again.

This fix is a hack only. It ensures that the realInputProc is never
overwritten with the enqueueInputProc.

This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511)
(cherry picked from commit eace88989c)
(cherry picked from commit 50e80c3987)
2007-12-29 00:14:12 +02:00
Daniel Stone
102c012c20 Input: Don't reinit devices
If a device is already initialised (i.e. the virtual core devices) during
IASD, don't init them again.  This fixes a leak.
(cherry picked from commit 1f6015c8fe62c28cfaa82cc855b5b9c28fd34607)
2007-12-28 15:51:05 +02:00
Daniel Stone
a304fc1d4a KDrive: Xephyr: Don't leak screen damage structure
(cherry picked from commit 0b03d97a244540824c922c300adbc3d3ae4855d5)
2007-12-28 15:51:00 +02:00
Daniel Stone
38d8cfaaff OS: Don't leak connection translation table on regeneration
(cherry picked from commit e868e0bc0d2318e62707d3ae68532b0029959154)
2007-12-28 15:50:56 +02:00
Daniel Stone
30fc8053a5 Config: HAL: Don't leak options on failure to add device
This showed up in Xephyr in particular, which denies new device requests.
(cherry picked from commit 2bb199056edf6c63cf978d1a8ad49a57ce1938f3)
2007-12-28 15:50:52 +02:00
Daniel Stone
81c5950d0a Config: D-Bus: Don't leak timers
TimerCancel doesn't free the timer: you need TimerFree for that.
(cherry picked from commit 25deaa7e6b29b3913b35efa39b9c8b25de5e6d95)
2007-12-28 15:50:49 +02:00
Arkadiusz Miskiewicz
d988da6eee Xprint: Clean up generated files
Remember to clean generated wrapper files.
(cherry picked from commit 977fcdea8198906936a64b8117e6a6d027c617e3)
2007-12-13 00:09:15 +02:00
Hong Liu
41f735fbe0 bgPixel (unsigned long) is 64-bit on x86_64, so -1 != 0xffffffff
This patch should fix bug 8080.
(cherry picked from commit 9adea80703)
2007-12-13 00:00:27 +02:00
Hong Liu
f4bcb53e86 Bug 13308: Verify and reject obviously broken modes.
(cherry picked from commit c6cfcd408d)
2007-12-12 23:59:54 +02:00
Daniel Stone
d63efecc94 Bump to 1.4.0.90 2007-12-12 21:57:59 +02:00
Bartosz Fabianowski
446efcc554 Input: Fix proximity events with valuators
Initialise num_events to 1, so we always send a proximity event, and then
optionally valuator events.  Also make sure mieq can deal with valuator
events sent after proximity events.
(cherry picked from commit 2dcfab37d38c0c72e9be7cc724047405c8029e88)
2007-12-07 02:38:44 +00:00
Daniel Stone
9f4689173e KDrive: Xephyr: Fix non-GLX builds
Only set noGlxExtension if we're actually building GLX.
2007-12-06 00:46:32 +00:00
Daniel Stone
d37351308b XKB: Actions: Don't run certain actions on the core keyboard
Don't run VT switches, terminations, or anything, on the core keyboard: only
run actions which affect the keyboard state.  If we get an action such as VT
switch, just swallow the event.
(cherry picked from commit 320abd7d1d)
2007-12-06 00:30:02 +00:00
Daniel Stone
27da1367c9 WaitForSomething: Ignore EAGAIN
If select ever returns EAGAIN, don't bother complaining.
(cherry picked from commit 85dd8efac1)
2007-12-06 00:30:01 +00:00
Rich Coe
259f86b13b OS: Connection: Keep trying select while it gets interrupted (bug #9240)
If we got interrupted (EINTR or EAGAIN) during select, just try again, rather
than shutting clients down on either of these errors.
(cherry picked from commit b7f3618f39)
2007-12-06 00:30:01 +00:00
Rich Coe
90649e6a39 OS: Connection: Don't shut down disappeared clients (bug #7876)
If a client disappears in the middle of CheckConnections (presumably
because its appgroup leader disappears), then don't attempt to shut it down
a second time, when it's already vanished.
(cherry picked from commit d8b2cad377)
2007-12-06 00:30:01 +00:00
Kanru Chen
25d26b55e7 Config: HAL: Fix XKB option parsing
Actually combine the XKB options into a string, rather than just repeatedly
writing a comma.
(cherry picked from commit da893908feb2dcf7c22420b3426ab3ac65c7ca99)
2007-12-03 12:46:50 +00:00
Peter Harris
b037e4a5ab Add missing swaps in panoramiXSwap.c
(cherry picked from commit cb67a10b7f6f564e0345de19316934361ea28720)
2007-11-30 20:42:28 +02:00
Daniel Stone
3e0993fcf3 ProcessOtherEvent: Don't do double translation of button events
We already deal with the button mapping in GetPointerEvents, so don't
do the remapping again in ProcessOtherEvent.
(cherry picked from commit 7ff002fe3e229330216d7f2ff16cdabe63014bcd)
2007-11-30 20:35:40 +02:00
Peter Hutterer
cbf775cde7 XKB: Generate correct key repeat events (bug #13114)
Make sure we send the correct event for the type of device when we're
sending key repeat events, which stops repeats being sent to incorrect
windows.
2007-11-17 22:50:07 +01:00
Michel Dänzer
3e987ea670 EXA: Don't attempt to move in pixmaps that can't be accelerated.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 .

(Related to commit 5d74416740 on master.)
2007-11-17 22:42:31 +01:00
Michel Dänzer
75b9dc907b EXA: Make sure tile offsets passed to drivers are never negative.
Thanks to Björn Steinbrink for pointing out the problem on IRC.

(cherry picked from commit 006f652505 with
 modifications.)
2007-11-17 22:40:36 +01:00
Michel Dänzer
732d586b09 EXA: Punt on fallback case not handled correctly in exaFillRegionTiled.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=12520 .

(From master commit c7d6d1f5, modified to suit.)
2007-11-17 22:39:34 +01:00
Daniel Stone
a3aed33244 XKB: Don't ring the bell when we don't have a BellProc (bug #13246)
(cherry picked from commit 55888552769ce6361174285b09dfb78ee22c170d)
2007-11-17 22:35:58 +01:00
Daniel Stone
f3a5d67688 GetKeyboardEvents: Reject out-of-range keycodes (bug #12528)
We can only deal with keycodes between 8 and 255, so make sure that we never
accept anything out of this range.
(cherry picked from commit 0e800ca465)
2007-11-17 22:07:08 +01:00
Naoki Hamada
35bf7c738a Input: Fix key down test (bug #12858)
Fix the botched previous key_is_down test, which would give false positives.
Also move key_autorepeats to a separate inline function.
(cherry picked from commit 242f56f722)
2007-11-17 22:06:51 +01:00
Daniel Stone
b3de1b9d37 XFree86 Misc/VidMode: Remove ridiculous debug ErrorFs
When we're building with --enable-debug, don't emit an ErrorF every time a
function gets called.
(cherry picked from commit 6d59bb5709)
2007-11-17 22:06:49 +01:00
Dodji Seketeli
007e2239cf Xephyr: don't initialise the GLX extension 2007-11-12 20:29:12 +01:00
Daniel Stone
7f231de5e0 .gitignore: Ignore build directories
Ignore directories people might use for building.
(cherry picked from commit 36df34cffd0cfcfb250fb42596781b3d4e9871eb)
2007-11-06 15:05:16 +00:00
Alan Coopersmith
4c20d61046 Actually build Secure RPC authentication support (missed in modularization)
(cherry picked from commit 23fbd5292d)
2007-11-06 14:54:20 +00:00
Matthias Hopf
f350c81a91 Prefer configured DisplaySize to probed DDC data, if available.
Based on patch by Hong Liu <hong.liu@intel.com>.
(cherry picked from commit 48ca5961ca)
2007-11-06 14:53:42 +00:00
Keith Packard
c550186570 Screen size changing should leave FB alone when X is inactive.
xf86RandR12ScreenSetSize must protect calls to EnableDisableFBAccess with
suitable vtSema checks to avoid invoking driver code while the X server is
inactive.
(cherry picked from commit 265a633cf1)
2007-11-06 14:53:03 +00:00
Elvis Pranskevichus
9244b8e4a2 Config: D-Bus: Fix dbus_bus_request_name failure check
The code in connect_hook incorrectly checks for dbus_bus_request_name failure.
The dbus_bus_request_name error indicator is -1, not 0. This leads
to subsequent assertion failure in libdbus.
(cherry picked from commit ddce48ede0)
2007-11-06 14:52:18 +00:00
Daniel Stone
0050d7e78d DIX: XKB: Set xkbInfo to NULL as well as freeing it (bug #10639)
XkbRemoveResourceClient wants to access xkbInfo if it exists, so make
sure we NULL it after freeing it.  It doesn't make much sense to move
the RemoveResourceClient call first, as there's not much point in
notifying clients while we're shutting the server down anyway.
(cherry picked from commit 23023af1c5a33546a2027cad23a946a2882e9893)
2007-11-06 14:52:11 +00:00
Markku Vire
846745c581 Config: HAL: Touchpads are pointers too
Treat touchpads -- not just mice -- as pointer devices.
(cherry picked from commit 3f1b6765aa)
2007-11-04 16:46:38 +00:00
Mark Vytlacil
ab80b27250 XFree86: Input: Save/restore errno around SIGIO (bug #10683)
Make sure errno is saved and restored from the SIGIO handler, so errors
from system calls in input handlers don't break the interrupted code.
(cherry picked from commit 41c3069f7c)
2007-11-04 16:46:34 +00:00
Daniel Stone
ad05d5d035 Input: Generate XKB mapping changes for all core-sending devices (bug #12523)
When we change the mapping on a core device, make sure we propagate this
through to XKB for all extended devices as well.
(cherry picked from commit 27ad5d74c2)
2007-10-31 01:07:17 +02:00
Peter Hutterer
84040b655e xfree86: wrap keyboard devices for XKB.
Call ProcessOtherEvents first, then for all keyboard devices let them be
wrapped by XKB. This way all XI events will go through XKB.

Note that the VCK is still not wrapped, so core events will bypass XKB.

(cherry picked from commit d627061b48)
(cherry picked from commit 8ead41388e)
2007-10-30 00:59:17 +02:00
Daniel Stone
e26e93c54e XKB: Cope with all events in XkbProcessKeyboardEvent
Cope with Xi and pointer events in the (now increasingly misnamed)
XkbProcessKeyboardEvent.  If it's the wrong type, call through the wrapping
chain to get out; else, process it.
(cherry picked from commit e717cf08e9)
2007-10-30 00:59:12 +02:00
Daniel Stone
37c690cfa4 XKB: Don't update indicators on all devices, add missing include file
Don't get XkbUpdateIndicators to update the indicators on all our devices: we
already deal with that ourselves.
Add exevents.h include to get more (proto)types.
(cherry picked from commit 9db8846fa5)
2007-10-30 00:59:07 +02:00
Peter Hutterer
1dce9c2028 xkb: Unwrap properly in ProcessPointerEvent.
Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly
and then call the unwrapped processInputProc. Seems to be a better idea,
especially since it makes stuff actually work...
(cherry picked from commit 8f9bf927e1)
(cherry picked from commit ee3aa948eb)
2007-10-30 00:58:59 +02:00
Peter Hutterer
940cce1f48 xkb: xkbHandleActions: let wrapping take care of event delivery.
This is hopefully better than hardcodey calling CoreProcessPointerEvent.
(cherry picked from commit 32d0440c7f)
(cherry picked from commit d3588a0aee)
2007-10-30 00:58:55 +02:00
Peter Hutterer
5909fb3c40 dix: don't compress motion events from different devices (EventEnqueue)
(cherry picked from commit 8840829ab9)
(cherry picked from commit 352c5a3112)
2007-10-30 00:58:51 +02:00
Peter Hutterer
600752bece dix: add XI event support to FixKeyState.
FixKeyState needs to be able to handle XI events, otherwise we get "impossible
keyboard events" on server zaps and other special key combos.
(cherry picked from commit 5ee409794e)
(cherry picked from commit 8d3d027062)
2007-10-30 00:58:43 +02:00