diff --git a/fb/fboverlay.c b/fb/fboverlay.c index d47a7c67b..4a5e899f6 100644 --- a/fb/fboverlay.c +++ b/fb/fboverlay.c @@ -26,6 +26,7 @@ #include #endif +#include #include #include "fb.h" @@ -210,6 +211,7 @@ fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) /* * Compute the portion of each fb affected by this copy */ + assert(pScrPriv->nlayers <= FB_OVERLAY_MAX); for (i = 0; i < pScrPriv->nlayers; i++) { RegionNull(&layerRgn[i]); RegionIntersect(&layerRgn[i], &rgnDst,