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>
(cherry picked from commit 1a01e96c6d
)
This commit is contained in:
parent
389e2656c0
commit
696d2d7109
|
@ -301,8 +301,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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user