xserver/fb fbedgeimp.h,1.1,1.2

Carl Worth xserver-commit@pdx.freedesktop.org
Fri Jan 21 10:40:53 PST 2005


Committed by: cworth

Update of /cvs/xserver/xserver/fb
In directory gabe:/tmp/cvs-serv21522/fb

Modified Files:
	fbedgeimp.h 
Log Message:

        * fb/fbedgeimp.h (rasterizeEdges):  Avoid buffer ovverrun when
        trapezoid's right edge is on a pixel boundary.


Index: fbedgeimp.h
===================================================================
RCS file: /cvs/xserver/xserver/fb/fbedgeimp.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fbedgeimp.h	29 Jul 2004 08:10:15 -0000	1.1
+++ fbedgeimp.h	21 Jan 2005 18:40:51 -0000	1.2
@@ -104,7 +104,11 @@
 			AddAlpha (N_X_FRAC(N_BITS));
 			StepAlpha;
 		    }
-		    AddAlpha (rxs);
+		    /* Do not add in a 0 alpha here. This check is
+		     * necessary to avoid a buffer overrun, (when rx
+		     * is exactly on a pixel boundary). */
+		    if (rxs)
+			AddAlpha (rxs);
 		}
 	    }
 #endif



More information about the xserver-commit mailing list