xserver/render
Alan Coopersmith 5e320e1193 render: avoid NULL pointer dereference if PictureFindVisual returns NULL
Found by Oracle Parfait 13.3:
   Null pointer dereference [null-pointer-deref]:
      Read from null pointer pVisual
        at line 257 of dix/colormap.c in function 'CreateColormap'.
          Null pointer introduced at line 412 of render/picture.c in
	   function 'PictureFindVisual'.
          Constant 'NULL' passed into function CreateColormap, argument
	   pVisual, from call at line 431 in function
	   'PictureInitIndexedFormat'.
          Function PictureFindVisual may return constant 'NULL' at
	   line 412, called at line 429.

Fixes: d4a101d4e ("Integration of DAMAGE-XFIXES branch to trunk")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 7af077dd2f)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1766>
2025-02-04 09:18:34 +01:00
..
animcur.c render: move private definitions out of picturestr.h 2024-03-03 22:54:16 +00:00
filter.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
glyph.c render: Avoid possible double-free in ProcRenderAddGlyphs() 2024-04-09 07:02:26 +00:00
glyphstr.h render: move private definitions out of public glyphstr.h 2024-03-03 22:54:16 +00:00
glyphstr_priv.h render: fix refcounting of glyphs during ProcRenderAddGlyphs 2024-04-02 19:19:40 -07:00
matrix.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
meson.build Drop Xorg DDX 2024-04-12 10:40:05 +02:00
miindex.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
mipict.c mi: Add a default no-op miSourceValidate 2019-10-30 16:26:01 +00:00
mipict.h render: Hide/unexport some implementation details 2015-07-08 16:40:57 -04:00
mirect.c render: Simplify miCompositeRects 2018-02-26 10:02:24 -05:00
mitrap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
mitri.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
picture.c render: avoid NULL pointer dereference if PictureFindVisual returns NULL 2025-02-04 09:18:34 +01:00
picture.h glamor: fix CbCr format handling 2022-12-01 08:41:57 +00:00
picturestr.h render: move private definitions out of public glyphstr.h 2024-03-03 22:54:16 +00:00
picturestr_priv.h render: move private definitions out of picturestr.h 2024-03-03 22:54:16 +00:00
render.c render: fix refcounting of glyphs during ProcRenderAddGlyphs 2024-04-02 19:19:40 -07:00