Commit Graph

3738 Commits

Author SHA1 Message Date
Alan Hourihane
a65d4aed06 Fix context sharing between direct/indirect contexts 2008-02-27 16:53:52 +00:00
Matthias Hopf
44f46bfb98 CVE-2007-6429: Always test for size+offset wrapping. 2008-02-20 22:17:42 +01:00
Kristian Høgsberg
bcbfd619f8 Don't break grab and focus state for a window when redirecting it.
Composite uses an unmap/map cycle to trigger backing pixmap allocation
and cliprect recomputation when a window is redirected or unredirected.
To avoid protocol visible side effects, map and unmap events are
disabled temporarily.  However, when a window is unmapped it is also
removed from grabs and loses focus, but these state changes are not
disabled.

This change supresses the unmap side effects during the composite
unmap/map cycle and fixes this bug:

  http://bugzilla.gnome.org/show_bug.cgi?id=488264

where compiz would cause gnome-screensaver to lose its grab when
compiz unredirects the fullscreen lock window.
2008-02-20 22:15:11 +01:00
Maarten Maathuis
dc30ade649 Fix rotation for multi-monitor situation.
- The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find.
- Fix bug #13787.
(cherry picked from commit a48cc88ea2)
2008-02-19 21:58:26 +02:00
Maarten Maathuis
3db5930c61 Resize composite overlay window when the root window changes.
- This allows some compositing managers to work, even after randr12 has changed the root window size.
- Thanks to ajax for figuring out the best place to put this.
- Example:
	- xf86RandR12SetMode() calls EnableDisableFBAccess().
	- That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize().
	- The final step is the call to PositionWindow().
(cherry picked from commit 70c0592a97)
2008-02-19 21:58:21 +02:00
Eamon Walsh
74b40bba32 security: Fix for Bug #14480: untrusted access broken in 7.3. 2008-02-14 19:47:44 -05:00
Peter Hutterer
bc72ef3a15 xkb: don't update LEDs if they don't exist. (Bug #13961)
In some weird cases we call this function when there is no SrvLedInfo on the
device. And it turns out null-pointer dereferences are bad.

X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961>
(cherry picked from commit d954f9c803)
2008-01-31 11:39:10 +11:00
Peter Hutterer
e98027c3ac dix: set the correct number of valuators in valuator events.
(first_valuator + num_valuators) must never be larger than the number of axes,
otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is
wrong too.
(cherry picked from commit 9f6ae61ad1)
2008-01-29 14:46:30 +11:00
Adam Jackson
b6d4cdf64f CVE-2007-6429: Don't spuriously reject <8bpp shm pixmaps.
Move size validation after depth validation, and only validate size if
the bpp of the pixmap format is > 8.  If bpp < 8 then we're already
protected from overflow by the width and height checks.
(cherry picked from commit e9fa7c1c88)
2008-01-18 21:01:32 +01:00
Matthieu Herrb
19b95cdd1d Fix for CVE-2007-5958 - File existence disclosure. 2008-01-17 17:03:39 +01:00
Matthieu Herrb
f09b8007e7 Fix for CVE-2008-0006 - PCF Font parser buffer overflow. 2008-01-17 17:02:52 +01:00
Matthieu Herrb
8b14f7b742 Fix for CVE-2007-6429 - MIT-SHM and EVI extensions integer overflows. 2008-01-17 17:02:36 +01:00
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