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

Eamon Walsh ewalsh at tycho.nsa.gov
Wed May 12 15:52:37 PDT 2010


Reviewed-by: Eamon Walsh <ewalsh at tycho.nsa.gov>


On 05/08/2010 07:39 PM, Jamey Sharp wrote:
> 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;
>   


-- 

Eamon Walsh 
National Security Agency



More information about the xorg-devel mailing list