Subject: Re: X11 server patch
To: jason downs <downsj@CSOS.ORST.EDU>
From: David Carrel <carrel@cisco.com>
List: port-hp300
Date: 08/11/1994 09:27:08
Jason,

obviously you've found the same bug that I am chasing.  Unfortunately, I
made the same patch that you posted and my server still crashes.  I found
that checking that pGC->tile.pixmap is not NULL helps somewhat, but
occasionally I get to this same point and pGC->tile.pixmap = 1.  I
definitely can't dereference it, and it passes the NULL pointer check.  I
was backtracking to figure out how this gets initialized, but I'm not done
yet.

Thoughts???

Dave


> patch for server/ddx/hpbsd/topcat/tcFillRct.c
> 
> if pixmap is NULL, you really shouldn't dereference it.
> 
> (this patch prevents 'xman' from crashing the server.)
> 
> *** tcFillRct.c.orig	Wed Aug 10 19:51:00 1994
> --- tcFillRct.c	Wed Aug 10 19:58:05 1994
> ***************
> *** 252,258 ****
>   	if (!((cfbPrivGCPtr) pGC->devPrivates[cfbGCPrivateIndex].ptr)->
>   							pRotatedPixmap)
>   	{
> ! 	    if (onScreen && pGC->tile.pixmap->devKind == PIXMAP_FRAME_BUFFER)
>   		BoxFill = tcFillRectTile;
>   	    else
>   		BoxFill = cfbFillRectTileOdd;
> --- 252,259 ----
>   	if (!((cfbPrivGCPtr) pGC->devPrivates[cfbGCPrivateIndex].ptr)->
>   							pRotatedPixmap)
>   	{
> ! 	    if (onScreen && pGC->tile.pixmap
> ! 		&& (pGC->tile.pixmap->devKind == PIXMAP_FRAME_BUFFER))
>   		BoxFill = tcFillRectTile;
>   	    else
>   		BoxFill = cfbFillRectTileOdd;
> 
> --
>                     ----------------------------------------
> -------------------// jason downs // downsj@CSOS.ORST.EDU //----------------
>       --
>                    ----------------------------------------      JD105
> 		  http://www.CSOS.ORST.EDU/downsj/index.html
> 		       have you fed your sysadmin today?

------------------------------------------------------------------------------