diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-04-19 21:09:44 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-04-19 21:09:44 +0000 |
commit | 119d0b666c94fc99c218f7b65157baf8ae3f1a3a (patch) | |
tree | 5c9349f3f7ebe9fb87a73cb463b829a078709379 | |
parent | 435ed3158cff7b9967aae2a33f52aab0d23720f6 (diff) | |
parent | ce2a433ca157b444b54646aa0383ff5b75cc41f9 (diff) | |
download | gtk+-119d0b666c94fc99c218f7b65157baf8ae3f1a3a.tar.gz |
Merge branch 'fix-uri-crash' into 'master'
Fix a possible crash in gtk_show_uri
Closes #3883
See merge request GNOME/gtk!3457
-rw-r--r-- | gdk/x11/gdkapplaunchcontext-x11.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/x11/gdkapplaunchcontext-x11.c b/gdk/x11/gdkapplaunchcontext-x11.c index 206c34e52d..43c190e5e6 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; |