xserver/hw/xnest
Enrico Weigelt, metux IT consult 118a24dadc Xnest: fix user specified color depth and memleak
Retrieving visuals offered by upstream Xserver is broken in several ways:

a) duplicate elimination breaks out too fast: when a duplicate is found,
   it doesn't just skips that one, it completely breaks out the loop,
   so subsequent upstream visuals aren't considered anymore. that's leading
   to (unpredictable) limit on available color depths (depending on the order
   reported by upstream sever)

b) buffer overflow when user specificed different depth/class than default one:
   xnestOpenScreen() looks into the wrong table: it's local visuals[] array,
   instead of the global (non-dedup'ed) list fetched by xlib. The visuals[]
   array is *much* smaller (deduplicated) than the xnestVisuals[] array,
   and xnestDefaultVisualIndex is likely to point outside of visual[]'s bounds.

To make it actually work against an Xorg upstream server, the upstream server
needs fix for another bug in the DIX:

    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1741
    https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1644

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1742
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-15 16:07:08 +02:00
..
man Replace "the the" with a single "the" in docs & comments 2022-03-31 13:27:57 -07:00
.gitignore Xnest: build Xnest man pages using XORG_MANPAGE_SECTIONS 2011-01-18 15:10:17 -08:00
Args.c os: unexport ddx callbacks 2024-05-08 09:37:35 +02:00
Args.h Xnest: cleanup X.h includes 2024-04-15 19:20:39 +00:00
Color.c rename remaining RT_* defines to X11_RESTYPE_* 2024-04-15 19:00:47 -07:00
Color.h Xnest: cleanup X.h includes 2024-04-15 19:20:39 +00:00
Cursor.c Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
Display.c Xnest: fix user specified color depth and memleak 2024-08-15 16:07:08 +02:00
Display.h Xnest: fix user specified color depth and memleak 2024-08-15 16:07:08 +02:00
Drawable.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Events.c Xnest: print event ID on warning about unhandled upstream event 2024-04-15 19:33:57 +00:00
Events.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Font.c Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
GC.c Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
GCOps.c Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
GCOps.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
Handlers.c Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
Handlers.h Remove fd_set from Block/Wakeup handler API 2016-07-18 15:27:51 -04:00
Init.c os: unexport ddx callbacks 2024-05-08 09:37:35 +02:00
Init.h Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
Keyboard.c Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
Keyboard.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
Pixmap.c Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
Pointer.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Pointer.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Screen.c Xnest: fix user specified color depth and memleak 2024-08-15 16:07:08 +02:00
Screen.h Xnest: cleanup X.h includes 2024-04-15 19:20:39 +00:00
Visual.c dix: Remove #includes of mibstore.h 2012-09-23 10:31:27 -07:00
Visual.h Xnest: cleanup X.h includes 2024-04-15 19:20:39 +00:00
Window.c rename remaining RT_* defines to X11_RESTYPE_* 2024-04-15 19:00:47 -07:00
XNCursor.h Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
XNFont.h Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
XNGC.h Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
XNPixmap.h Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
XNWindow.h Xnest: canonicalize includes: <X11/Xdefs.h> 2024-04-15 19:20:39 +00:00
Xnest.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
icon R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
meson.build mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
screensaver R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
xnest-config.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00