!44 update to 1.8.4
From: @leeffo Reviewed-by: @weidongkl Signed-off-by: @weidongkl
This commit is contained in:
commit
d28e31bad6
@ -1,56 +0,0 @@
|
||||
From 1d11822601fd24a396b354fa616b04ed3df8b4ef Mon Sep 17 00:00:00 2001
|
||||
From: "Thomas E. Dickey" <dickey@invisible-island.net>
|
||||
Date: Tue, 4 Oct 2022 18:26:17 -0400
|
||||
Subject: [PATCH] fix a memory leak in XRegisterIMInstantiateCallback
|
||||
|
||||
Analysis:
|
||||
|
||||
_XimRegisterIMInstantiateCallback() opens an XIM and closes it using
|
||||
the internal function pointers, but the internal close function does
|
||||
not free the pointer to the XIM (this would be done in XCloseIM()).
|
||||
|
||||
Report/patch:
|
||||
|
||||
Date: Mon, 03 Oct 2022 18:47:32 +0800
|
||||
From: Po Lu <luangruo@yahoo.com>
|
||||
To: xorg-devel@lists.x.org
|
||||
Subject: Re: Yet another leak in Xlib
|
||||
|
||||
For reference, here's how I'm calling XRegisterIMInstantiateCallback:
|
||||
|
||||
XSetLocaleModifiers ("");
|
||||
XRegisterIMInstantiateCallback (compositor.display,
|
||||
XrmGetDatabase (compositor.display),
|
||||
(char *) compositor.resource_name,
|
||||
(char *) compositor.app_name,
|
||||
IMInstantiateCallback, NULL);
|
||||
|
||||
and XMODIFIERS is:
|
||||
|
||||
@im=ibus
|
||||
|
||||
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=1d11822601fd24a396b354fa616b04ed3df8b4ef
|
||||
---
|
||||
modules/im/ximcp/imInsClbk.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/modules/im/ximcp/imInsClbk.c b/modules/im/ximcp/imInsClbk.c
|
||||
index 95b379cb..c10e347f 100644
|
||||
--- a/modules/im/ximcp/imInsClbk.c
|
||||
+++ b/modules/im/ximcp/imInsClbk.c
|
||||
@@ -212,6 +212,9 @@ _XimRegisterIMInstantiateCallback(
|
||||
if( xim ) {
|
||||
lock = True;
|
||||
xim->methods->close( (XIM)xim );
|
||||
+ /* XIMs must be freed manually after being opened; close just
|
||||
+ does the protocol to deinitialize the IM. */
|
||||
+ XFree( xim );
|
||||
lock = False;
|
||||
icb->call = True;
|
||||
callback( display, client_data, NULL );
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,6 +1,17 @@
|
||||
diff -up libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx libX11-1.6.3/modules/im/ximcp/imDefFlt.c
|
||||
--- libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx 2015-03-09 18:28:45.000000000 -0400
|
||||
+++ libX11-1.6.3/modules/im/ximcp/imDefFlt.c 2015-03-10 12:32:31.912149644 -0400
|
||||
From f8b0946c5594728ce7e1cd04552acce05571cd4e Mon Sep 17 00:00:00 2001
|
||||
From: leeffo <leeffo@yeah.net>
|
||||
Date: Wed, 12 Apr 2023 10:40:48 +0800
|
||||
Subject: [PATCH] dont forward keycode 0
|
||||
|
||||
---
|
||||
modules/im/ximcp/imDefFlt.c | 2 +-
|
||||
modules/im/ximcp/imDefLkup.c | 24 ++++++++++++++++++++++++
|
||||
2 files changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/im/ximcp/imDefFlt.c b/modules/im/ximcp/imDefFlt.c
|
||||
index 44cc688..f89d2cb 100644
|
||||
--- a/modules/im/ximcp/imDefFlt.c
|
||||
+++ b/modules/im/ximcp/imDefFlt.c
|
||||
@@ -142,7 +142,7 @@ _XimProtoKeypressFilter(
|
||||
{
|
||||
Xim im = (Xim)ic->core.im;
|
||||
@ -10,10 +21,11 @@ diff -up libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx libX11-1.6.3/modules/im/xim
|
||||
_XimPendingFilter(ic);
|
||||
UNMARK_FABRICATED(im);
|
||||
return NOTFILTERD;
|
||||
diff -up libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx libX11-1.6.3/modules/im/ximcp/imDefLkup.c
|
||||
--- libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx 2015-03-09 18:28:45.000000000 -0400
|
||||
+++ libX11-1.6.3/modules/im/ximcp/imDefLkup.c 2015-03-10 12:32:31.911149637 -0400
|
||||
@@ -332,6 +332,17 @@ _XimForwardEvent(
|
||||
diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c
|
||||
index dd1adf5..61f9c95 100644
|
||||
--- a/modules/im/ximcp/imDefLkup.c
|
||||
+++ b/modules/im/ximcp/imDefLkup.c
|
||||
@@ -333,6 +333,17 @@ _XimForwardEvent(
|
||||
XEvent *ev,
|
||||
Bool sync)
|
||||
{
|
||||
@ -31,7 +43,7 @@ diff -up libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx libX11-1.6.3/modules/im/xi
|
||||
#ifdef EXT_FORWARD
|
||||
if (((ev->type == KeyPress) || (ev->type == KeyRelease)))
|
||||
if (_XimExtForwardKeyEvent(ic, (XKeyEvent *)ev, sync))
|
||||
@@ -604,6 +615,19 @@ _XimUnregCommitInfo(
|
||||
@@ -605,6 +616,19 @@ _XimUnregCommitInfo(
|
||||
Xfree(info->keysym);
|
||||
ic->private.proto.commit_info = info->next;
|
||||
Xfree(info);
|
||||
@ -51,3 +63,6 @@ diff -up libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx libX11-1.6.3/modules/im/xi
|
||||
return;
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
Binary file not shown.
BIN
libX11-1.8.4.tar.xz
Normal file
BIN
libX11-1.8.4.tar.xz
Normal file
Binary file not shown.
11
libX11.spec
11
libX11.spec
@ -1,13 +1,13 @@
|
||||
Name: libX11
|
||||
Version: 1.8.1
|
||||
Release: 4
|
||||
Version: 1.8.4
|
||||
Release: 1
|
||||
Summary: Core X11 protocol client library
|
||||
License: MIT
|
||||
URL: http://www.x.org
|
||||
Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.xz
|
||||
|
||||
Patch1: dont-forward-keycode-0.patch
|
||||
Patch6001: backport-CVE-2022-3554.patch
|
||||
#Patch6001: backport-CVE-2022-3554.patch
|
||||
|
||||
BuildRequires: xorg-x11-util-macros >= 1.11 xorg-x11-proto-devel perl-Pod-Usage libXau-devel
|
||||
BuildRequires: libxcb-devel >= 1.2 libXdmcp-devel xorg-x11-xtrans-devel >= 1.0.3-4 make
|
||||
@ -73,10 +73,13 @@ make %{?_smp_mflags} check
|
||||
|
||||
%files help
|
||||
%defattr(-,root,root)
|
||||
%doc README.md NEWS ChangeLog
|
||||
%doc README.md ChangeLog
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Wed Apr 12 2023 liweiganga <liweiganga@uniontech.com> - 1.8.4-1
|
||||
- update to 1.8.4
|
||||
|
||||
* Tue Apr 11 2023 zhangpan <zhangpan103@h-partners.com> - 1.8.1-4
|
||||
- add build options for i686
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user