aboutsummaryrefslogtreecommitdiff
path: root/fontconfig
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-07-01 09:29:23 +0200
committermarha <marha@users.sourceforge.net>2014-07-01 09:29:23 +0200
commitb6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad (patch)
tree2cf97060ce44345489da6d1bcbbe568d2b2ea666 /fontconfig
parentac314766fd4f60b8ee0346b7586c1a5a6f533e11 (diff)
parentcfc5bafcb2db8c6e05d7be6bb7315960be08c0d8 (diff)
downloadvcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.tar.gz
vcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.tar.bz2
vcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa pixman git update 1 July 2014
Diffstat (limited to 'fontconfig')
-rw-r--r--fontconfig/src/fccfg.c6
-rw-r--r--fontconfig/src/fcxml.c23
2 files changed, 28 insertions, 1 deletions
diff --git a/fontconfig/src/fccfg.c b/fontconfig/src/fccfg.c
index 8b62e520c..e2555f0ce 100644
--- a/fontconfig/src/fccfg.c
+++ b/fontconfig/src/fccfg.c
@@ -2009,6 +2009,8 @@ FcConfigXdgCacheHome (void)
const char *env = getenv ("XDG_CACHE_HOME");
FcChar8 *ret = NULL;
+ if (!_FcConfigHomeEnabled)
+ return NULL;
if (env)
ret = FcStrCopy ((const FcChar8 *)env);
else
@@ -2034,6 +2036,8 @@ FcConfigXdgConfigHome (void)
const char *env = getenv ("XDG_CONFIG_HOME");
FcChar8 *ret = NULL;
+ if (!_FcConfigHomeEnabled)
+ return NULL;
if (env)
ret = FcStrCopy ((const FcChar8 *)env);
else
@@ -2059,6 +2063,8 @@ FcConfigXdgDataHome (void)
const char *env = getenv ("XDG_DATA_HOME");
FcChar8 *ret = NULL;
+ if (!_FcConfigHomeEnabled)
+ return NULL;
if (env)
ret = FcStrCopy ((const FcChar8 *)env);
else
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index e4c811cd5..15b774f00 100644
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -2052,7 +2052,14 @@ FcParseDir (FcConfigParse *parse)
attr = FcConfigGetAttribute (parse, "prefix");
if (attr && FcStrCmp (attr, (const FcChar8 *)"xdg") == 0)
+ {
prefix = FcConfigXdgDataHome ();
+ /* home directory might be disabled.
+ * simply ignore this element.
+ */
+ if (!prefix)
+ goto bail;
+ }
data = FcStrBufDoneStatic (&parse->pstack->str);
if (!data)
{
@@ -2143,11 +2150,18 @@ static void
FcParseCacheDir (FcConfigParse *parse)
{
const FcChar8 *attr;
- FcChar8 *prefix = NULL, *p, *data;
+ FcChar8 *prefix = NULL, *p, *data = NULL;
attr = FcConfigGetAttribute (parse, "prefix");
if (attr && FcStrCmp (attr, (const FcChar8 *)"xdg") == 0)
+ {
prefix = FcConfigXdgCacheHome ();
+ /* home directory might be disabled.
+ * simply ignore this element.
+ */
+ if (!prefix)
+ goto bail;
+ }
data = FcStrBufDone (&parse->pstack->str);
if (!data)
{
@@ -2255,7 +2269,14 @@ FcParseInclude (FcConfigParse *parse)
deprecated = FcTrue;
attr = FcConfigGetAttribute (parse, "prefix");
if (attr && FcStrCmp (attr, (const FcChar8 *)"xdg") == 0)
+ {
prefix = FcConfigXdgConfigHome ();
+ /* home directory might be disabled.
+ * simply ignore this element.
+ */
+ if (!prefix)
+ goto bail;
+ }
if (prefix)
{
size_t plen = strlen ((const char *)prefix);