git: c302c31eba10 - 2024Q1 - x11-servers/xwayland-devel: adjust upstream reference after 77f72c463b90

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Thu, 04 Apr 2024 12:44:09 UTC
The branch 2024Q1 has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c302c31eba10db78e273b3ee4df494439fe63ca9

commit c302c31eba10db78e273b3ee4df494439fe63ca9
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-04-04 12:20:45 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-04-04 12:42:26 +0000

    x11-servers/xwayland-devel: adjust upstream reference after 77f72c463b90
    
    Only using 1 rebased patch from 23.2 branch as the rest apply fine "as is".
    
    --- bdca6c3d1f50.patch  2024-04-04 00:37:36 UTC
    +++ 01941a831811.patch  2024-04-04 09:39:24 UTC
    @@ -1,4 +1,4 @@
    -From bdca6c3d1f5057eeb31609b1280fc93237b00c77 Mon Sep 17 00:00:00 2001
    +From 01941a831811c9fd47ffed5ea96375abeb20c9fc Mon Sep 17 00:00:00 2001
     From: Peter Hutterer <peter.hutterer@who-t.net>
     Date: Tue, 30 Jan 2024 13:13:35 +1000
     Subject: [PATCH] render: fix refcounting of glyphs during ProcRenderAddGlyphs
    @@ -20,15 +20,17 @@ Jan-Niklas Sohn working with Trend Micro Zero Day Init
     This vulnerability was discovered by:
     Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
    
    -Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463>
    +(backported from commit bdca6c3d1f5057eeb31609b1280fc93237b00c77)
    +
    +Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1464>
     ---
    - render/glyph.c         |  5 +++--
    - render/glyphstr_priv.h |  1 +
    - render/render.c        | 15 +++++++++++----
    - 3 files changed, 15 insertions(+), 6 deletions(-)
    + render/glyph.c    |  5 +++--
    + render/glyphstr.h |  3 +++
    + render/render.c   | 15 +++++++++++----
    + 3 files changed, 17 insertions(+), 6 deletions(-)
    
     diff --git a/render/glyph.c b/render/glyph.c
    -index 850ea8440d..13991f8a12 100644
    +index f3ed9cf4c1..d5fc5f3c91 100644
     --- a/render/glyph.c
     +++ b/render/glyph.c
     @@ -245,10 +245,11 @@ FreeGlyphPicture(GlyphPtr glyph)
    @@ -53,20 +55,22 @@ +    glyph->refcnt = 1;
          glyph->size = size + sizeof(xGlyphInfo);
          glyph->info = *gi;
          dixInitPrivates(glyph, (char *) glyph + head_size, PRIVATE_GLYPH);
    -diff --git a/render/glyphstr_priv.h b/render/glyphstr_priv.h
    -index 90a90fa4f6..dd1bc54825 100644
    ---- a/render/glyphstr_priv.h
    -+++ b/render/glyphstr_priv.h
    -@@ -56,6 +56,7 @@ void AddGlyph(GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
    - Bool DeleteGlyph(GlyphSetPtr glyphSet, Glyph id);
    - GlyphPtr FindGlyph(GlyphSetPtr glyphSet, Glyph id);
    - GlyphPtr AllocateGlyph(xGlyphInfo * gi, int format);
    -+void FreeGlyph(GlyphPtr glyph, int format);
    - Bool ResizeGlyphSet(GlyphSetPtr glyphSet, CARD32 change);
    - GlyphSetPtr AllocateGlyphSet(int fdepth, PictFormatPtr format);
    - int FreeGlyphSet(void *value, XID gid);
    +diff --git a/render/glyphstr.h b/render/glyphstr.h
    +index 2f51bd244a..fb6589d3e2 100644
    +--- a/render/glyphstr.h
    ++++ b/render/glyphstr.h
    +@@ -102,6 +102,9 @@ HashGlyph(xGlyphInfo * gi,
    + extern void
    +  AddGlyph(GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
    +
    ++extern void
    ++FreeGlyph(GlyphPtr glyph, int format);
    ++
    + extern Bool
    +  DeleteGlyph(GlyphSetPtr glyphSet, Glyph id);
    +
     diff --git a/render/render.c b/render/render.c
    -index 29c5055c62..fe5e37dd9a 100644
    +index 456f156d43..5bc2a204b7 100644
     --- a/render/render.c
     +++ b/render/render.c
     @@ -1076,6 +1076,7 @@ ProcRenderAddGlyphs(ClientPtr client)
    
    Reported by:    manu
---
 x11-servers/xwayland-devel/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x11-servers/xwayland-devel/Makefile b/x11-servers/xwayland-devel/Makefile
index 2edd4156938c..5fa6714f7f49 100644
--- a/x11-servers/xwayland-devel/Makefile
+++ b/x11-servers/xwayland-devel/Makefile
@@ -14,7 +14,7 @@ PATCH_SITES+=	${GL_SITE}/${GL_ACCOUNT}/${GL_PROJECT}/-/commit/
 PATCHFILES+=	96798fc19674.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463
 PATCHFILES+=	3e77295f888c.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463
 PATCHFILES+=	6c684d035c06.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463
-PATCHFILES+=	01941a831811.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463
+PATCHFILES+=	01941a831811.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1464
 
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	X11 server as Wayland client (development snapshot)