MFH: r561081

- Fix script used to extract themes to fallback to /tmp when both
  TMPDIR and XDG_CACHE_HOME environment variables are not defined [1]
- Fix crash caused by null terminated list missing the terminating
  null element due to no allocating enough elements [2]

Reported by:		Andrea Venturoli <ml@netfence.it> [1] [2]
Patch submitted by:	Andrea Venturoli <ml@netfence.it> [2]
This commit is contained in:
Guido Falsi 2021-01-10 15:36:23 +00:00
parent 2d498b9d31
commit 21caab2dfe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2021Q1/; revision=561082
3 changed files with 22 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= xfce4-settings
PORTVERSION= 4.16.0
PORTREVISION= 1
CATEGORIES= sysutils xfce
MASTER_SITES= XFCE
DIST_SUBDIR= xfce4

View File

@ -0,0 +1,10 @@
--- dialogs/appearance-settings/appearance-install-theme.orig 2015-08-01 08:43:16 UTC
+++ dialogs/appearance-settings/appearance-install-theme
@@ -104,6 +104,7 @@ fi
# we try $XDG_CACHE_HOME because it is more likely this is on the
# same partition, so moving the theme after extract is faster
if test x"`which mktemp 2>/dev/null`" != x""; then
+ TMPDIR="${TMPDIR:-/tmp}"
tmpdir=`TMPDIR="${XDG_CACHE_HOME:-$TMPDIR}" mktemp -d`
else
tmpdir="/tmp/tmp.$$.$RANDOM"

View File

@ -0,0 +1,11 @@
--- dialogs/appearance-settings/main.c.orig 2020-12-16 10:44:46 UTC
+++ dialogs/appearance-settings/main.c
@@ -994,7 +994,7 @@ appearance_settings_install_theme_cb (GtkButton *widge
gchar **uris;
GtkFileChooser *chooser = GTK_FILE_CHOOSER (dialog);
- uris = g_new0 (gchar *, 1);
+ uris = g_new0 (gchar *, 2);
filename = gtk_file_chooser_get_filename (chooser);
uris[0] = g_filename_to_uri (filename, NULL, NULL);
install_theme (window, uris, builder);