fontconfig: Branch 'main' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 25 02:08:08 UTC 2025


 src/fccfg.c |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit a0450eec4c796ff344df4a4883142260fd2697a9
Merge: c527fe1 4a579ac
Author: Akira TAGOH <akira at tagoh.org>
Date:   Wed Jun 25 02:08:06 2025 +0000

    Merge branch 'fix-xdg' into 'main'
    
    fix: Skip empty entries in XDG_DATA_DIRS parsing
    
    See merge request fontconfig/fontconfig!439

commit 4a579aca645fd70da6739c493fd13643aad33250
Author: ComixHe <heyuming at deepin.org>
Date:   Mon Jun 23 17:06:50 2025 +0800

    fix: Skip empty entries in XDG_DATA_DIRS parsing
    
    The XDG_DATA_DIRS environment variable parsing was not handling
    leading colons correctly (e.g., ":/usr/share:/usr/local/share").
    This resulted in empty string entries being added to the StrSet.
    
    Signed-off-by: ComixHe <heyuming at deepin.org>
    
    Changelog: fixed

diff --git a/src/fccfg.c b/src/fccfg.c
index 969eadf..4bd1e4d 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -2546,6 +2546,11 @@ FcConfigXdgDataDirs (void)
 		e = p + 1;
 	    }
 	    len = strlen ((const char *)s);
+	    if (len == 0) {
+		FcStrFree (s);
+		continue;
+	    }
+
 	    if (s[len - 1] == FC_DIR_SEPARATOR) {
 		do {
 		    len--;


More information about the Fontconfig mailing list