diff --git a/fb/fboverlay.c b/fb/fboverlay.c index 32ae550c5..6349381c0 100644 --- a/fb/fboverlay.c +++ b/fb/fboverlay.c @@ -24,6 +24,7 @@ #include +#include #include #include "mi/mi_priv.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,