[PATCH 07/14] doPolyText needs UseAccess to each font, not ReadAccess.

Jamey Sharp jamey at minilop.net
Sat May 8 16:39:22 PDT 2010


In commit 42d6112ec21949a336ee8b34469f2695273ee2d6, Eamon changed
dixChangeGC to require DixUseAccess on any GCFont XID. I think
doPolyText needs to require the same level of access. Otherwise
dixChangeGC could fail when it does the same lookup, which doPolyText
doesn't check for.

Signed-off-by: Jamey Sharp <jamey at minilop.net>
Cc: Eamon Walsh <ewalsh at tycho.nsa.gov>
---
 dix/dixfonts.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 6dc8193..313d085 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1235,7 +1235,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
 		 | ((Font)*(c->pElt+2)) << 16
 		 | ((Font)*(c->pElt+1)) << 24;
 	    err = dixLookupResourceByType((pointer *)&pFont, fid, RT_FONT,
-					  client, DixReadAccess);
+					  client, DixUseAccess);
 	    if (err != Success)
 	    {
 		err = (err == BadValue) ? BadFont : err;
-- 
1.7.0



More information about the xorg-devel mailing list