!215 fix FreeGC call funcs not checked
From: @kiraskyler Reviewed-by: @t_feng Signed-off-by: @t_feng
This commit is contained in:
commit
4c31ea197e
35
fix-segfault-if-CreateGC-failed-in-XaceHook.patch
Normal file
35
fix-segfault-if-CreateGC-failed-in-XaceHook.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 9b1bb4a69190aaecafcbcafd97f6b42811c6e14b Mon Sep 17 00:00:00 2001
|
||||
From: niuwanli <niuwanli@cysoftware.com.cn>
|
||||
Date: Wed, 24 Jan 2024 17:14:47 +0800
|
||||
Subject: [PATCH] Fix the FreeGC call funcs not checked
|
||||
|
||||
---
|
||||
dix/gc.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dix/gc.c b/dix/gc.c
|
||||
index 4ccbd3b..80b375b 100644
|
||||
--- a/dix/gc.c
|
||||
+++ b/dix/gc.c
|
||||
@@ -770,14 +770,16 @@ FreeGC(void *value, XID gid)
|
||||
GCPtr pGC = (GCPtr) value;
|
||||
|
||||
CloseFont(pGC->font, (Font) 0);
|
||||
- (*pGC->funcs->DestroyClip) (pGC);
|
||||
+ if (pGC->funcs)
|
||||
+ (*pGC->funcs->DestroyClip) (pGC);
|
||||
|
||||
if (!pGC->tileIsPixel)
|
||||
(*pGC->pScreen->DestroyPixmap) (pGC->tile.pixmap);
|
||||
if (pGC->stipple)
|
||||
(*pGC->pScreen->DestroyPixmap) (pGC->stipple);
|
||||
|
||||
- (*pGC->funcs->DestroyGC) (pGC);
|
||||
+ if (pGC->funcs)
|
||||
+ (*pGC->funcs->DestroyGC) (pGC);
|
||||
if (pGC->dash != DefaultDash)
|
||||
free(pGC->dash);
|
||||
dixFreeObjectWithPrivates(pGC, PRIVATE_GC);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
Name: xorg-x11-server
|
||||
Version: 1.20.11
|
||||
Release: 26
|
||||
Release: 27
|
||||
Summary: X.Org X11 X server
|
||||
License: MIT and GPLv2
|
||||
URL: https://www.x.org
|
||||
@ -118,6 +118,7 @@ Patch6032: backport-CVE-2023-6816.patch
|
||||
Patch6033: backport-0001-CVE-2024-0229.patch
|
||||
Patch6034: backport-0002-CVE-2024-0229.patch
|
||||
Patch6035: backport-0003-CVE-2024-0229.patch
|
||||
Patch6036: fix-segfault-if-CreateGC-failed-in-XaceHook.patch
|
||||
|
||||
BuildRequires: audit-libs-devel autoconf automake bison dbus-devel flex git gcc
|
||||
BuildRequires: systemtap-sdt-devel libtool pkgconfig
|
||||
@ -459,6 +460,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Mon Feb 5 2024 niuwanli <niuwanli@cysoftware.com.cn> - 1.20.11-27
|
||||
- fix segfault if CreateGC failed in XaceHook
|
||||
|
||||
* Mon Jan 29 2024 yangchenguang <yangchenguang@kylinsec.com.cn> - 1.20.11-26
|
||||
- Modify sw_64 patch to use all arch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user