Compare commits
10 Commits
74354951a5
...
7d11bec62c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d11bec62c | ||
|
|
572ff27d71 | ||
|
|
97f3f4247f | ||
|
|
447ddf2b1c | ||
|
|
f66153442d | ||
|
|
8e0e37e1b7 | ||
|
|
9bac72b4e8 | ||
|
|
0af8c262d0 | ||
|
|
d28e31bad6 | ||
|
|
8da42f9487 |
@ -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
|
From f8b0946c5594728ce7e1cd04552acce05571cd4e Mon Sep 17 00:00:00 2001
|
||||||
--- libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx 2015-03-09 18:28:45.000000000 -0400
|
From: leeffo <leeffo@yeah.net>
|
||||||
+++ libX11-1.6.3/modules/im/ximcp/imDefFlt.c 2015-03-10 12:32:31.912149644 -0400
|
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(
|
@@ -142,7 +142,7 @@ _XimProtoKeypressFilter(
|
||||||
{
|
{
|
||||||
Xim im = (Xim)ic->core.im;
|
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);
|
_XimPendingFilter(ic);
|
||||||
UNMARK_FABRICATED(im);
|
UNMARK_FABRICATED(im);
|
||||||
return NOTFILTERD;
|
return NOTFILTERD;
|
||||||
diff -up libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx libX11-1.6.3/modules/im/ximcp/imDefLkup.c
|
diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c
|
||||||
--- libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx 2015-03-09 18:28:45.000000000 -0400
|
index dd1adf5..61f9c95 100644
|
||||||
+++ libX11-1.6.3/modules/im/ximcp/imDefLkup.c 2015-03-10 12:32:31.911149637 -0400
|
--- a/modules/im/ximcp/imDefLkup.c
|
||||||
@@ -332,6 +332,17 @@ _XimForwardEvent(
|
+++ b/modules/im/ximcp/imDefLkup.c
|
||||||
|
@@ -333,6 +333,17 @@ _XimForwardEvent(
|
||||||
XEvent *ev,
|
XEvent *ev,
|
||||||
Bool sync)
|
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
|
#ifdef EXT_FORWARD
|
||||||
if (((ev->type == KeyPress) || (ev->type == KeyRelease)))
|
if (((ev->type == KeyPress) || (ev->type == KeyRelease)))
|
||||||
if (_XimExtForwardKeyEvent(ic, (XKeyEvent *)ev, sync))
|
if (_XimExtForwardKeyEvent(ic, (XKeyEvent *)ev, sync))
|
||||||
@@ -604,6 +615,19 @@ _XimUnregCommitInfo(
|
@@ -605,6 +616,19 @@ _XimUnregCommitInfo(
|
||||||
Xfree(info->keysym);
|
Xfree(info->keysym);
|
||||||
ic->private.proto.commit_info = info->next;
|
ic->private.proto.commit_info = info->next;
|
||||||
Xfree(info);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
|
|||||||
21
libX11-1.7.2-sw_64.patch
Normal file
21
libX11-1.7.2-sw_64.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
diff -Naru libX11-1.7.2/src/xcb_io.c libX11-1.7.2-sw/src/xcb_io.c
|
||||||
|
--- libX11-1.7.2/src/xcb_io.c 2021-06-06 16:48:53.000000000 +0000
|
||||||
|
+++ libX11-1.7.2-sw/src/xcb_io.c 2022-09-01 03:24:00.479452203 +0000
|
||||||
|
@@ -542,7 +542,7 @@
|
||||||
|
static const xReq dummy_request;
|
||||||
|
static char const pad[3];
|
||||||
|
struct iovec vec[3];
|
||||||
|
- uint64_t requests;
|
||||||
|
+ unsigned long requests;
|
||||||
|
uint64_t dpy_request;
|
||||||
|
_XExtension *ext;
|
||||||
|
xcb_connection_t *c = dpy->xcb->connection;
|
||||||
|
@@ -563,7 +563,7 @@
|
||||||
|
if(dpy->xcb->event_owner != XlibOwnsEventQueue || dpy->async_handlers)
|
||||||
|
{
|
||||||
|
uint64_t sequence;
|
||||||
|
- for(sequence = dpy->xcb->last_flushed + 1; sequence <= dpy_request; ++sequence)
|
||||||
|
+ for(sequence = dpy->xcb->last_flushed + 1; (unsigned long)sequence <= dpy_request; ++sequence)
|
||||||
|
append_pending_request(dpy, sequence);
|
||||||
|
}
|
||||||
|
requests = dpy_request - dpy->xcb->last_flushed;
|
||||||
Binary file not shown.
BIN
libX11-1.8.7.tar.xz
Normal file
BIN
libX11-1.8.7.tar.xz
Normal file
Binary file not shown.
29
libX11.spec
29
libX11.spec
@ -1,13 +1,13 @@
|
|||||||
Name: libX11
|
Name: libX11
|
||||||
Version: 1.8.1
|
Version: 1.8.7
|
||||||
Release: 4
|
Release: 2
|
||||||
Summary: Core X11 protocol client library
|
Summary: Core X11 protocol client library
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.xz
|
Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
Patch1: dont-forward-keycode-0.patch
|
Patch1: dont-forward-keycode-0.patch
|
||||||
Patch6001: backport-CVE-2022-3554.patch
|
Patch2: libX11-1.7.2-sw_64.patch
|
||||||
|
|
||||||
BuildRequires: xorg-x11-util-macros >= 1.11 xorg-x11-proto-devel perl-Pod-Usage libXau-devel
|
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
|
BuildRequires: libxcb-devel >= 1.2 libXdmcp-devel xorg-x11-xtrans-devel >= 1.0.3-4 make
|
||||||
@ -36,9 +36,9 @@ The %{name}-devel package contains libraries and header files for %{name}.
|
|||||||
%build
|
%build
|
||||||
autoreconf -ivf
|
autoreconf -ivf
|
||||||
%if 0%{?build_cross} == 1
|
%if 0%{?build_cross} == 1
|
||||||
%configure --disable-silent-rules --enable-malloc0returnsnull --disable-static
|
%configure --disable-silent-rules --enable-malloc0returnsnull
|
||||||
%else
|
%else
|
||||||
%configure --disable-silent-rules --disable-static
|
%configure --disable-silent-rules
|
||||||
%endif
|
%endif
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
@ -66,6 +66,7 @@ make %{?_smp_mflags} check
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
%{_libdir}/*.a
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
%{_includedir}/X11/*.h
|
%{_includedir}/X11/*.h
|
||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
@ -73,10 +74,26 @@ make %{?_smp_mflags} check
|
|||||||
|
|
||||||
%files help
|
%files help
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.md NEWS ChangeLog
|
%doc README.md ChangeLog
|
||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 05 2024 zhouwenpei <zhouwenpei1@h-partners.com> - 1.8.7-2
|
||||||
|
- revent "disable static library"
|
||||||
|
|
||||||
|
* Wed Oct 04 2023 Funda Wang <fundawang@yeah.net> - 1.8.7-1
|
||||||
|
- update to 1.8.7
|
||||||
|
- merge sw64 patch
|
||||||
|
|
||||||
|
* Sat Jul 22 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 1.8.6-1
|
||||||
|
- update to 1.8.6
|
||||||
|
|
||||||
|
* Mon Jun 19 2023 liweigang <liweiganga@uniontech.com> - 1.8.4-2
|
||||||
|
- fix CVE-2023-3138
|
||||||
|
|
||||||
|
* 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
|
* Tue Apr 11 2023 zhangpan <zhangpan103@h-partners.com> - 1.8.1-4
|
||||||
- add build options for i686
|
- add build options for i686
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user