diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-08-30 03:05:21 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-08-30 03:05:21 +0000 |
commit | 7777d325a3d049cc233c004cba288ed5d10539c2 (patch) | |
tree | 90332d49274d1333b8191779462dc20fe8fdfece /fb | |
parent | e321f9e7ff7de9aa702e33a22743b55c8bb66953 (diff) |
Apply an xserver patch from cworth: Avoid buffer ovverrun when a
trapezoid's right edge is on a pixel boundary.
Diffstat (limited to 'fb')
-rw-r--r-- | fb/fbedgeimp.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fb/fbedgeimp.h b/fb/fbedgeimp.h index 136a15e36..877393516 100644 --- a/fb/fbedgeimp.h +++ b/fb/fbedgeimp.h @@ -108,7 +108,12 @@ rasterizeEdges (FbBits *buf, 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 != 0) + AddAlpha (rxs); } } #endif |