mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-03-31 04:10:41 +02:00
fb: quiet -Wanalyzer-out-of-bounds warnings in fbOverlayCopyWindow()
Reported in #1817: xwayland-24.1.6/redhat-linux-build/../fb/fboverlay.c:230:13: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read xwayland-24.1.6/redhat-linux-build/../fb/fboverlay.c:233:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
16ca2c7a11
commit
460d008fdd
1 changed files with 2 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue