From 2f3fac7d812f8e17061e3040b47be3e24256bb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Thu, 25 Feb 2021 09:51:24 +0100 Subject: [PATCH] Flatpak: add broadway variable type fix patch --- ...k4-broadway-fix-unsafe-variable-type.patch | 26 +++++++++++++++++++ pkgs/flatpak/lib/gtk4.json | 4 +++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/flatpak/lib/gtk4-broadway-fix-unsafe-variable-type.patch diff --git a/pkgs/flatpak/lib/gtk4-broadway-fix-unsafe-variable-type.patch b/pkgs/flatpak/lib/gtk4-broadway-fix-unsafe-variable-type.patch new file mode 100644 index 00000000..3ceed471 --- /dev/null +++ b/pkgs/flatpak/lib/gtk4-broadway-fix-unsafe-variable-type.patch @@ -0,0 +1,26 @@ +From c6320cfd75c65bfb1736b7ca5afc9c0f5ffc09d7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= +Date: Thu, 25 Feb 2021 09:45:38 +0100 +Subject: [PATCH] Broadway: fix unsafe variable type + +Only guint32 guarantees to be always 32bit on all platforms. Mixing 32bit and 64bit memory sizes leads to a crash. +--- + gdk/broadway/gdkbroadway-server.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdk/broadway/gdkbroadway-server.c b/gdk/broadway/gdkbroadway-server.c +index 02b6f93183..e6b96ff0b9 100644 +--- a/gdk/broadway/gdkbroadway-server.c ++++ b/gdk/broadway/gdkbroadway-server.c +@@ -235,7 +235,7 @@ static void + parse_all_input (GdkBroadwayServer *server) + { + guint8 *p, *end; +- size_t size; ++ guint32 size; + BroadwayReply *reply; + + p = server->recv_buffer; +-- +2.26.2 + diff --git a/pkgs/flatpak/lib/gtk4.json b/pkgs/flatpak/lib/gtk4.json index 50f5f9ad..64727c6f 100644 --- a/pkgs/flatpak/lib/gtk4.json +++ b/pkgs/flatpak/lib/gtk4.json @@ -24,6 +24,10 @@ { "type": "patch", "path": "gtk4-popover-unrealize.patch" + }, + { + "type": "patch", + "path": "gtk4-broadway-fix-unsafe-variable-type.patch" } ] }