#726985 fontconfig: Fontconfig error: out of memory

Package:
fontconfig
Source:
fontconfig
Description:
generic font configuration library - support binaries
Submitter:
Arthur Marsh
Date:
2013-10-31 11:18:04 UTC
Severity:
normal
#726985#5
Date:
2013-10-21 09:13:27 UTC
From:
To:
Dear Maintainer,
*** Please consider answering these questions, where appropriate ***

   * What led up to the situation?

running programs such as mplayer or vlc from a command prompt

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Fontconfig error: "/etc/fonts/conf.d/65-khmer.conf", line 14: out of memory
Fontconfig error: "/etc/fonts/conf.d/65-khmer.conf", line 23: out of memory
Fontconfig error: "/etc/fonts/conf.d/65-khmer.conf", line 32: out of memory

amarsh04@am64:~$ more /etc/fonts/conf.d/65-khmer.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!-- Khmer (km) -->

<match target="font">
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Khmer OS</family>
                </prefer>
        </alias>
</match>

<match target="font">
        <alias>
                <family>serif</family>
                <prefer>
                        <family>Khmer OS</family>
                </prefer>
        </alias>
</match>

<match target="font">
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>Khmer OS System</family>
                </prefer>
        </alias>
</match>

<!-- Khmer (km) ends -->

</fontconfig>

   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these lines ***

#726985#10
Date:
2013-10-22 01:04:12 UTC
From:
To:
Same problem with gnuplot after the upgrade to fontconfig 2.11.0-1.

$ gnuplot -persist <<EOF
plot '-' using 1:2 t '' with line
0 0
10 10
e
EOF
Fontconfig error: "/home/vinc17/.config/fontconfig/fonts.conf", line 18: out of memory

I've attached this file.

#726985#15
Date:
2013-10-22 02:00:51 UTC
From:
To:
[...]

According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726979
your file is buggy. However,

1. Even with such a buggy file, the "out of memory" error message is
incorrect (if there's an error in the file, the error message should
be different).

2. My file doesn't contain "alias" as a child of "match". So, it's
possible to trigger the error even with a valid file.

#726985#20
Date:
2013-10-31 11:15:15 UTC
From:
To:
If I remove the empty "match", the error goes away. I've reported
this particular bug upstream:

https://bugs.freedesktop.org/show_bug.cgi?id=71085

I've also mentioned this Debian bug and the problem with invalid
files, but this (an error on some invalid file) is not the main
purpose of this upstream bug.