diff options
author | marha <marha@users.sourceforge.net> | 2014-07-01 09:29:23 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-07-01 09:29:23 +0200 |
commit | b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad (patch) | |
tree | 2cf97060ce44345489da6d1bcbbe568d2b2ea666 /fontconfig | |
parent | ac314766fd4f60b8ee0346b7586c1a5a6f533e11 (diff) | |
parent | cfc5bafcb2db8c6e05d7be6bb7315960be08c0d8 (diff) | |
download | vcxsrv-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.c | 6 | ||||
-rw-r--r-- | fontconfig/src/fcxml.c | 23 |
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); |