39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From 0ef7c3716d9373617acd26bc5249cf5ed15a1dab Mon Sep 17 00:00:00 2001
|
||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||
Date: Tue, 28 Oct 2025 18:16:00 -0700
|
||
Subject: [PATCH xserver 12/31] glamor: avoid null dereference in
|
||
glamor_dash_setup()
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
Reported in #1817:
|
||
|
||
xwayland-24.1.6/redhat-linux-build/../glamor/glamor_dash.c:152:10:
|
||
warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
|
||
|
||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||
(cherry picked from commit c6522229b86f9087347b17280b6e5f19345baf9a)
|
||
(cherry picked from commit 84dccbc45a5cbc6fe4583cc946460c12c749ec70)
|
||
|
||
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
|
||
---
|
||
glamor/glamor_dash.c | 2 +-
|
||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
||
diff --git a/glamor/glamor_dash.c b/glamor/glamor_dash.c
|
||
index 828969d91..74252de33 100644
|
||
--- a/glamor/glamor_dash.c
|
||
+++ b/glamor/glamor_dash.c
|
||
@@ -149,7 +149,7 @@ glamor_dash_setup(DrawablePtr drawable, GCPtr gc)
|
||
dash_pixmap = glamor_get_dash_pixmap(gc);
|
||
dash_priv = glamor_get_pixmap_private(dash_pixmap);
|
||
|
||
- if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(dash_priv))
|
||
+ if (!dash_priv || !GLAMOR_PIXMAP_PRIV_HAS_FBO(dash_priv))
|
||
goto bail;
|
||
|
||
glamor_make_current(glamor_priv);
|
||
--
|
||
2.54.0
|
||
|