OpenSolaris

Printable Version Enter a New Search
Bug ID 6477136
Synopsis Application crashed in FcHideFont if non-alphabetical name exists
State 10-Fix Delivered (Fix available in build)
Category:Subcategory xserver:font
Keywords
Responsible Engineer Jay Hobson
Reported Against snv_49
Duplicate Of
Introduced In
Commit to Fix snv_51
Fixed In snv_51
Release Fixed solaris_nevada(snv_51) , solaris_10u6(s10u6_01) (Bug ID:2168562)
Related Bugs
Submit Date 2-October-2006
Last Update Date 16-January-2007
Description
I encountered fontconfig core dump like the following on nv_b49
===
% ./fc-match monospace
zsh: segmentation fault (core dumped)  ./fc-match monospace
% pstack core
core 'core' of 18655:   ./fc-match monospace
 fef710b9 FcHideFont (80668f8, 80caf78, 80caf60, 8047a0c) + b9
 fef71642 FcFontSetMatch (80615e8, 8047b48, 1, 80e4a50, 8047b80) + 1c2
 fef71ad2 FcFontMatch (80615e8, 80e4a50, 8047b80) + a2
 08050d1f main     (2, 8047bcc, 8047bd8) + 17f
 08050a6a _start   (2, 8047c94, 8047c9f, 0, 8047ca9, 8047cd5) + 7a
===
Since some rare font doesn't start alphabetical name,
pos value should be checked before accessing array. See comment.
===
static FcPattern *
FcHideFont ( FcHide       *r,
             FcPatternElt *pe,
             FcPattern    *fnt,
             FcLangSet   **pls )
{
    FcPattern  *new = fnt;
    FcFontLang *fl;

    if ( r && pe )
    {
        int pos = (int)(FcToLower(pe->values->value.u.s[0])) - 'a';

        fl = r->az[pos];
===
Remove unnecessary information.
Work Around
Remove unnecessary information.
Comments
N/A