Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/flathub/shared-modules.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2022-07-24 20:58:24 +0300
committerPatrick Griffis <pgriffis@igalia.com>2022-07-24 20:58:24 +0300
commitdc4acc85254feb52e3b2296588ec8a4c2908786b (patch)
tree9a1d2e624d521322cc3ea8c66a6ef922e41ff100
parent1be814b01e24e994d030b36875233ea251b47773 (diff)
GTK2: Add patch fixing crash in gtk_show_uri()
-rw-r--r--gtk2/gtk2-fix-crash-in-show-uri.patch30
-rw-r--r--gtk2/gtk2.json4
2 files changed, 34 insertions, 0 deletions
diff --git a/gtk2/gtk2-fix-crash-in-show-uri.patch b/gtk2/gtk2-fix-crash-in-show-uri.patch
new file mode 100644
index 0000000..27b2730
--- /dev/null
+++ b/gtk2/gtk2-fix-crash-in-show-uri.patch
@@ -0,0 +1,30 @@
+From 536da7a15c1737bc63c8ecba5ccac40cc2170860 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 19 Apr 2021 16:39:53 -0400
+Subject: [PATCH] Fix a possible crash in gtk_show_uri
+
+g_file_get_basename can return NULL.
+Deal with it somehow.
+
+Fixes: #3883
+---
+ gdk/x11/gdkapplaunchcontext-x11.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gdk/x11/gdkapplaunchcontext-x11.c b/gdk/x11/gdkapplaunchcontext-x11.c
+index 8051229ba5..2341bb2e1f 100644
+--- a/gdk/x11/gdkapplaunchcontext-x11.c
++++ b/gdk/x11/gdkapplaunchcontext-x11.c
+@@ -45,6 +45,9 @@ get_display_name (GFile *file,
+ if (name == NULL)
+ {
+ name = g_file_get_basename (file);
++ if (name == NULL)
++ name = g_file_get_uri (file);
++
+ if (!g_utf8_validate (name, -1, NULL))
+ {
+ tmp = name;
+--
+GitLab
+
diff --git a/gtk2/gtk2.json b/gtk2/gtk2.json
index 512b467..bfca223 100644
--- a/gtk2/gtk2.json
+++ b/gtk2/gtk2.json
@@ -63,6 +63,10 @@
{
"type": "patch",
"path": "gtk2-use-adwaita-theme.patch"
+ },
+ {
+ "type": "patch",
+ "path": "gtk2-fix-crash-in-show-uri.patch"
}
]
},