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