xserver: Branch 'master'

Alan Coopersmith alanc at kemper.freedesktop.org
Fri May 9 15:39:16 PDT 2008


 dix/dixfonts.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 1a01e96c6d15ef17a8b5ab1afa361fb12476a25e
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Fri May 9 15:38:44 2008 -0700

    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>

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index e9a3f39..6fb29de 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) {


More information about the xorg-commit mailing list