diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-05-09 15:38:44 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-05-09 15:38:44 -0700 |
commit | 1a01e96c6d15ef17a8b5ab1afa361fb12476a25e (patch) | |
tree | 927e6623141d22a0250756ab66410bae9588e931 /dix/dixfonts.c | |
parent | 7b3066d9b9099135d9c49e0682161d5568fc535b (diff) |
Return a valid X error when stuck in font alias loop
Part of fix for Sun bug 4258475
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4258475>
Diffstat (limited to 'dix/dixfonts.c')
-rw-r--r-- | dix/dixfonts.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dix/dixfonts.c b/dix/dixfonts.c index e9a3f3963..6fb29de3a 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -302,8 +302,14 @@ doOpenFont(ClientPtr client, OFclosurePtr c) c->fontname = newname; c->fnamelen = newlen; c->current_fpe = 0; - if (--aliascount <= 0) + if (--aliascount <= 0) { + /* We've tried resolving this alias 20 times, we're + * probably stuck in an infinite loop of aliases pointing + * to each other - time to take emergency exit! + */ + err = BadImplementation; break; + } continue; } if (err == BadFontName) { |