Task #2020 - xorg-x11-server-Xwayland-23.2.4-3.fc40/scan-results.err
back to task #2020download
Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/geext.c:195:10: warning[deadcode.DeadStores]: Although the value stored to 'extEntry' is used in the enclosing expression, the value is never actually read from 'extEntry' # 193| FatalError("GEExtensionInit: GE private request failed.\n"); # 194| # 195|-> if ((extEntry = AddExtension(GE_NAME, # 196| 0, GENumberErrors, # 197| ProcGEDispatch, SProcGEDispatch, Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:441:15: warning[deadcode.DeadStores]: Value stored to 'pScreen' during its initialization is never read # 439| Bool success = FALSE; # 440| ExtensionEntry *extEntry; # 441|-> ScreenPtr pScreen = screenInfo.screens[0]; # 442| PanoramiXScreenPtr pScreenPriv; # 443| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c: scope_hint: In function ‘PanoramiXMaybeAddDepth’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:752:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘PanoramiXDepths’ # 750| PanoramiXDepths = reallocarray(PanoramiXDepths, # 751| PanoramiXNumDepths, sizeof(DepthRec)); # 752|-> PanoramiXDepths[j].depth = pDepth->depth; # 753| PanoramiXDepths[j].numVids = 0; # 754| PanoramiXDepths[j].vids = NULL; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c: scope_hint: In function ‘PanoramiXConsolidate’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:824:16: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘root’ # 822| # 823| root = malloc(sizeof(PanoramiXRes)); # 824|-> root->type = XRT_WINDOW; # 825| defmap = malloc(sizeof(PanoramiXRes)); # 826| defmap->type = XRT_COLORMAP; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:826:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘defmap’ # 824| root->type = XRT_WINDOW; # 825| defmap = malloc(sizeof(PanoramiXRes)); # 826|-> defmap->type = XRT_COLORMAP; # 827| saver = malloc(sizeof(PanoramiXRes)); # 828| saver->type = XRT_WINDOW; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:828:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘saver’ # 826| defmap->type = XRT_COLORMAP; # 827| saver = malloc(sizeof(PanoramiXRes)); # 828|-> saver->type = XRT_WINDOW; # 829| # 830| FOR_NSCREENS(i) { Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:842:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*root.info[0].id’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:49: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.h:74:25: note: in expansion of macro ‘FOR_NSCREENS_FORWARD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:830:5: note: in expansion of macro ‘FOR_NSCREENS’ # 840| } # 841| # 842|-> AddResource(root->info[0].id, XRT_WINDOW, root); # 843| AddResource(saver->info[0].id, XRT_WINDOW, saver); # 844| AddResource(defmap->info[0].id, XRT_COLORMAP, defmap); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:842:5: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 840| } # 841| # 842|-> AddResource(root->info[0].id, XRT_WINDOW, root); # 843| AddResource(saver->info[0].id, XRT_WINDOW, saver); # 844| AddResource(defmap->info[0].id, XRT_COLORMAP, defmap); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1130:17: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'src') # 1128| # 1129| while (bytes--) { # 1130|-> *dst |= SHIFT_L(*src, shiftL); # 1131| *(dst + 1) |= SHIFT_R(*src, shiftR); # 1132| dst++; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c: scope_hint: In function ‘CopyBits’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1130:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘src’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1116:23: note: in definition of macro ‘SHIFT_L’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.h:74:25: note: in expansion of macro ‘FOR_NSCREENS_FORWARD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1174:5: note: in expansion of macro ‘FOR_NSCREENS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.h:74:25: note: in expansion of macro ‘FOR_NSCREENS_FORWARD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1174:5: note: in expansion of macro ‘FOR_NSCREENS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/region.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/window.h:51: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:52: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:39: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c: scope_hint: In function ‘CopyBits’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1116:23: note: in definition of macro ‘SHIFT_L’ # 1128| # 1129| while (bytes--) { # 1130|-> *dst |= SHIFT_L(*src, shiftL); # 1131| *(dst + 1) |= SHIFT_R(*src, shiftR); # 1132| dst++; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1250:43: warning[core.NullDereference]: Array access (from variable 'ScratchMem') results in a null pointer dereference # 1248| # 1249| for (j = h, k = w; j--; k += ScratchPitch) # 1250|-> ScratchMem[k] &= mask; # 1251| } # 1252| Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c: scope_hint: In function ‘XineramaGetImageData’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1257:33: warning[-Wanalyzer-null-argument]: use of NULL ‘ScratchMem’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.h:74:25: note: in expansion of macro ‘FOR_NSCREENS_FORWARD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1174:5: note: in expansion of macro ‘FOR_NSCREENS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.h:74:25: note: in expansion of macro ‘FOR_NSCREENS_FORWARD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1174:5: note: in expansion of macro ‘FOR_NSCREENS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c: scope_hint: In function ‘XineramaGetImageData’ <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 1255| if (w) { # 1256| if (!shift) # 1257|-> memcpy(data + index, ScratchMem + index2, w); # 1258| else # 1259| CopyBits(data + index, shift, Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1257:33: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 1255| if (w) { # 1256| if (!shift) # 1257|-> memcpy(data + index, ScratchMem + index2, w); # 1258| else # 1259| CopyBits(data + index, shift, Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1280:25: warning[-Wanalyzer-null-argument]: use of NULL ‘ScratchMem’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.h:74:25: note: in expansion of macro ‘FOR_NSCREENS_FORWARD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1174:5: note: in expansion of macro ‘FOR_NSCREENS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c: scope_hint: In function ‘XineramaGetImageData’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1274:25: note: in expansion of macro ‘BitsPerPixel’ <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 1278| # 1279| for (j = 0; j < h; j++) { # 1280|-> memcpy(data + (pitch * (y + j)) + x, # 1281| ScratchMem + (ScratchPitch * j), w); # 1282| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.c:1280:25: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 1278| # 1279| for (j = 0; j < h; j++) { # 1280|-> memcpy(data + (pitch * (y + j)) + x, # 1281| ScratchMem + (ScratchPitch * j), w); # 1282| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1114:38: warning[core.NullDereference]: Access to field 'depth' results in a dereference of an undefined pointer value # 1112| } # 1113| # 1114|-> pitch = PixmapBytePad(width, drawables[0]->depth); # 1115| if (!(data = calloc(height, pitch))) # 1116| return BadAlloc; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1137:13: warning[core.NullDereference]: Access to field 'graphicsExposures' results in a dereference of an undefined pointer value (loaded from variable 'pGC') # 1135| free(data); # 1136| # 1137|-> if (pGC->graphicsExposures) { # 1138| RegionRec rgn; # 1139| int dx, dy; Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c: scope_hint: In function ‘PanoramiXCopyArea’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1137:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pGC’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h:151: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/pixmapstr.h:52: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:51: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:35: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1061:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:45: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1068:17: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1075:17: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1121:9: note: in expansion of macro ‘FOR_NSCREENS_BACKWARD’ # 1135| free(data); # 1136| # 1137|-> if (pGC->graphicsExposures) { # 1138| RegionRec rgn; # 1139| int dx, dy; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1246:13: warning[core.NullDereference]: Access to field 'graphicsExposures' results in a dereference of a null pointer (loaded from variable 'pGC') # 1244| } # 1245| # 1246|-> if (pGC->graphicsExposures) { # 1247| Bool overlap; # 1248| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1358:9: warning[core.NullDereference]: Access to field 'graphicsExposures' results in a dereference of a null pointer (loaded from variable 'pGC') # 1356| } # 1357| # 1358|-> if (pGC->graphicsExposures) { # 1359| Bool overlap; # 1360| Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c: scope_hint: In function ‘PanoramiXPolyPoint’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1399:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘origPts’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1380:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1387:9: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/window.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1398:19: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1398:19: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1397| if (npoint > 0) { # 1398| origPts = xallocarray(npoint, sizeof(xPoint)); # 1399|-> memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); # 1400| FOR_NSCREENS_FORWARD(j) { # 1401| Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c: scope_hint: In function ‘PanoramiXPolyLine’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1464:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘origPts’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1445:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1452:9: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1460:14: note: in expansion of macro ‘IS_ROOT_DRAWABLE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1463:19: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1463:19: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1462| if (npoint > 0) { # 1463| origPts = xallocarray(npoint, sizeof(xPoint)); # 1464|-> memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); # 1465| FOR_NSCREENS_FORWARD(j) { # 1466| Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c: scope_hint: In function ‘PanoramiXPolySegment’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1533:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘origSegs’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1510:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1517:9: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1525:14: note: in expansion of macro ‘IS_ROOT_DRAWABLE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1532:20: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1532:20: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1531| if (nsegs > 0) { # 1532| origSegs = xallocarray(nsegs, sizeof(xSegment)); # 1533|-> memcpy((char *) origSegs, (char *) &stuff[1], nsegs * sizeof(xSegment)); # 1534| FOR_NSCREENS_FORWARD(j) { # 1535| Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c: scope_hint: In function ‘PanoramiXPolyRectangle’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1601:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘origRecs’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1578:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1585:9: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1593:14: note: in expansion of macro ‘IS_ROOT_DRAWABLE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1600:20: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1600:20: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1599| if (nrects > 0) { # 1600| origRecs = xallocarray(nrects, sizeof(xRectangle)); # 1601|-> memcpy((char *) origRecs, (char *) &stuff[1], # 1602| nrects * sizeof(xRectangle)); # 1603| FOR_NSCREENS_FORWARD(j) { Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c: scope_hint: In function ‘PanoramiXPolyArc’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1668:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘origArcs’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1645:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1652:9: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1660:14: note: in expansion of macro ‘IS_ROOT_DRAWABLE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1667:20: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1667:20: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1666| if (narcs > 0) { # 1667| origArcs = xallocarray(narcs, sizeof(xArc)); # 1668|-> memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc)); # 1669| FOR_NSCREENS_FORWARD(j) { # 1670| Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c: scope_hint: In function ‘PanoramiXFillPoly’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1730:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘locPts’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1710:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1717:9: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1725:14: note: in expansion of macro ‘IS_ROOT_DRAWABLE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1729:18: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1729:18: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1728| if (count > 0) { # 1729| locPts = xallocarray(count, sizeof(DDXPointRec)); # 1730|-> memcpy((char *) locPts, (char *) &stuff[1], # 1731| count * sizeof(DDXPointRec)); # 1732| FOR_NSCREENS_FORWARD(j) { Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c: scope_hint: In function ‘PanoramiXPolyFillRectangle’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1799:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘origRects’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1776:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1783:9: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1791:14: note: in expansion of macro ‘IS_ROOT_DRAWABLE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1798:21: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1798:21: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1797| if (things > 0) { # 1798| origRects = xallocarray(things, sizeof(xRectangle)); # 1799|-> memcpy((char *) origRects, (char *) &stuff[1], # 1800| things * sizeof(xRectangle)); # 1801| FOR_NSCREENS_FORWARD(j) { Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c: scope_hint: In function ‘PanoramiXPolyFillArc’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1866:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘origArcs’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1843:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1850:9: note: in expansion of macro ‘IS_SHARED_PIXMAP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1858:14: note: in expansion of macro ‘IS_ROOT_DRAWABLE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1865:20: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:1865:20: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1864| if (narcs > 0) { # 1865| origArcs = xallocarray(narcs, sizeof(xArc)); # 1866|-> memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc)); # 1867| FOR_NSCREENS_FORWARD(j) { # 1868| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:2015:9: warning[core.NullDereference]: Access to field 'pScreen' results in a dereference of an undefined pointer value # 2013| } # 2014| FOR_NSCREENS_FORWARD(i) { # 2015|-> drawables[i]->pScreen->SourceValidate(drawables[i], 0, 0, # 2016| drawables[i]->width, # 2017| drawables[i]->height, Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXprocs.c:2370:20: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 2368| FOR_NSCREENS_BACKWARD(j) { # 2369| stuff->srcCmap = cmap->info[j].id; # 2370|-> stuff->mid = newCmap->info[j].id; # 2371| result = (*SavedProcVector[X_CopyColormapAndFree]) (client); # 2372| if (result != Success) Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/saver.c:263:22: warning[core.NullDereference]: Access to field 'resource' results in a dereference of a null pointer (loaded from variable 'pEv') # 261| break; # 262| if (mask == 0) { # 263|-> FreeResource(pEv->resource, SaverEventType); # 264| *pPrev = pEv->next; # 265| free(pEv); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:1004:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rects’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:1194:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:1195:5: note: in expansion of macro ‘swapl’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:951:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:197:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:963:18: note: in expansion of macro ‘wInputShape’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:197:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:963:18: note: in expansion of macro ‘wInputShape’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c: scope_hint: In function ‘ProcShapeGetRectangles’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:1000:17: note: in expansion of macro ‘xallocarray’ # 1002| return BadAlloc; # 1003| for (i = 0; i < nrects; i++, box++) { # 1004|-> rects[i].x = box->x1; # 1005| rects[i].y = box->y1; # 1006| rects[i].width = box->x2 - box->x1; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shm.c: scope_hint: In function ‘ShmInitScreenPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shm.c:214:34: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘screen_priv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shm.c:210:37: note: in expansion of macro ‘ShmGetScreenPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shm.c:48: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shm.c: scope_hint: In function ‘ShmInitScreenPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shm.c:210:37: note: in expansion of macro ‘ShmGetScreenPriv’ # 212| if (!screen_priv) { # 213| screen_priv = calloc(1, sizeof(ShmScrPrivateRec)); # 214|-> screen_priv->CloseScreen = pScreen->CloseScreen; # 215| dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, screen_priv); # 216| pScreen->CloseScreen = ShmCloseScreen; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shm.c:870:9: warning[core.NullDereference]: Access to field 'pScreen' results in a dereference of a null pointer # 868| } # 869| FOR_NSCREENS_FORWARD(i) { # 870|-> drawables[i]->pScreen->SourceValidate(drawables[i], 0, 0, # 871| drawables[i]->width, # 872| drawables[i]->height, Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shm.c:1008:31: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1006| shmdesc->refcnt++; # 1007| pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; # 1008|-> pMap->drawable.id = newPix->info[j].id; # 1009| if (!AddResource(newPix->info[j].id, RT_PIXMAP, (void *) pMap)) { # 1010| result = BadAlloc; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:892:17: warning[unix.MallocSizeof]: Result of 'malloc' is converted to a pointer of type 'SyncObject', which is incompatible with sizeof operand type 'SyncCounter' # 890| switch (type) { # 891| case SYNC_COUNTER: # 892|-> pSync = malloc(sizeof(SyncCounter)); # 893| resType = RTCounter; # 894| break; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:1286:27: warning[core.NullDereference]: Access to field 'counter' results in a dereference of a null pointer (loaded from variable 'walklist') # 1284| char *pname_in_reply; # 1285| # 1286|-> walklist->counter = psci->pCounter->sync.id; # 1287| walklist->resolution_hi = psci->resolution >> 32; # 1288| walklist->resolution_lo = psci->resolution; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:1538:17: warning[core.NullDereference]: Access to field 'type' results in a dereference of a null pointer (loaded from field 'pSync') # 1536| * errors before we get here out if they occur # 1537| */ # 1538|-> switch (pAwait->trigger.pSync->type) { # 1539| case SYNC_COUNTER: # 1540| value = ((SyncCounter *) pAwait->trigger.pSync)->value; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c: scope_hint: In function ‘IdleTimeQueryValue’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:2648:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/screenint.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:61: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:432:25: note: in expansion of macro ‘__BUG_WARN_MSG’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:120:5: note: in expansion of macro ‘BUG_WARN’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:421:20: note: in definition of macro ‘__BUG_WARN_MSG’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:120:5: note: in expansion of macro ‘BUG_WARN’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:120:15: note: in expansion of macro ‘IsSystemCounter’ # 2646| SyncCounter *counter = pCounter; # 2647| IdleCounterPriv *priv = SysCounterGetPrivate(counter); # 2648|-> deviceid = priv->deviceid; # 2649| } # 2650| else Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c: scope_hint: In function ‘IdleTimeBlockHandler’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:2661:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 2659| SyncCounter *counter = pCounter; # 2660| IdleCounterPriv *priv = SysCounterGetPrivate(counter); # 2661|-> int64_t *less = priv->value_less; # 2662| int64_t *greater = priv->value_greater; # 2663| int64_t idle, old_idle; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:2664:22: warning[deadcode.DeadStores]: Value stored to 'list' during its initialization is never read # 2662| int64_t *greater = priv->value_greater; # 2663| int64_t idle, old_idle; # 2664|-> SyncTriggerList *list = counter->sync.pTriglist; # 2665| SyncTrigger *trig; # 2666| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c: scope_hint: In function ‘IdleTimeWakeupHandler’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:2751:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 2749| SyncCounter *counter = pCounter; # 2750| IdleCounterPriv *priv = SysCounterGetPrivate(counter); # 2751|-> int64_t *less = priv->value_less; # 2752| int64_t *greater = priv->value_greater; # 2753| int64_t idle; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c: scope_hint: In function ‘IdleTimeBracketValues’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:2784:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 2782| SyncCounter *counter = pCounter; # 2783| IdleCounterPriv *priv = SysCounterGetPrivate(counter); # 2784|-> int64_t *less = priv->value_less; # 2785| int64_t *greater = priv->value_greater; # 2786| Bool registered = (less || greater); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c: scope_hint: In function ‘init_system_idle_counter’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:2821:48: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘priv’ # 2819| IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv)); # 2820| # 2821|-> priv->value_less = priv->value_greater = NULL; # 2822| priv->deviceid = deviceid; # 2823| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:2824:53: warning[core.NullDereference]: Access to field 'private' results in a dereference of a null pointer (loaded from field 'pSysCounterInfo') # 2822| priv->deviceid = deviceid; # 2823| # 2824|-> idle_time_counter->pSysCounterInfo->private = priv; # 2825| } # 2826| Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/sync.c:2827:12: warning[-Wanalyzer-malloc-leak]: leak of ‘priv’ # 2825| } # 2826| # 2827|-> return idle_time_counter; # 2828| } # 2829| Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:96:5: warning[-Wanalyzer-null-argument]: use of NULL ‘VidModeCreateMode()’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c: scope_hint: In function ‘ProcVidModeModModeLine’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:188:13: note: in expansion of macro ‘VM_GETPRIV’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:42: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c: scope_hint: In function ‘ProcVidModeModModeLine’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:188:13: note: in expansion of macro ‘VM_GETPRIV’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:1835:9: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:41: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:1836:9: note: in expansion of macro ‘swapl’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:188:13: note: in expansion of macro ‘VM_GETPRIV’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c: scope_hint: In function ‘ProcVidModeModModeLine’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:188:13: note: in expansion of macro ‘VM_GETPRIV’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:753:9: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘ProcVidModeModModeLine’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c: scope_hint: In function ‘ProcVidModeModModeLine’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c: scope_hint: In function ‘ProcVidModeModModeLine’ <built-in>: scope_hint: In function ‘ProcVidModeModModeLine’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 94| VidModeCopyMode(DisplayModePtr modefrom, DisplayModePtr modeto) # 95| { # 96|-> memcpy(modeto, modefrom, sizeof(DisplayModeRec)); # 97| } # 98| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:934:5: warning[deadcode.DeadStores]: Value stored to 'status' is never read # 932| pScreen = screenInfo.screens[stuff->screen]; # 933| # 934|-> status = MODE_OK; # 935| # 936| if (stuff->hsyncstart < stuff->hdisplay || Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c: scope_hint: In function ‘ProcVidModeGetDotClocks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:1377:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Clocks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:1983:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:1984:5: note: in expansion of macro ‘swaps’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c:1333:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘ProcVidModeGetDotClocks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c: scope_hint: In function ‘ProcVidModeGetDotClocks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/vidmode.c: scope_hint: In function ‘ProcVidModeGetDotClocks’ # 1375| if (!ClockProg) { # 1376| for (n = 0; n < numClocks; n++) { # 1377|-> dotclock = Clocks[n]; # 1378| if (client->swapped) { # 1379| WriteSwappedDataToClient(client, 4, (char *) &dotclock); Error: GCC_ANALYZER_WARNING (CWE-590): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:139:9: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘it’ which points to memory on the stack xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:1065:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:14: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:1066:5: note: in expansion of macro ‘swapl’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:1067:5: note: in expansion of macro ‘REQUEST_FIXED_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:957:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:91:16: note: in definition of macro ‘REQUEST_FIXED_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:960:5: note: in expansion of macro ‘REQUEST_FIXED_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h:152: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/resource.h:96:41: note: in expansion of macro ‘RESOURCE_CLIENT_BITS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/resource.h:98:33: note: in expansion of macro ‘RESOURCE_CLIENT_MASK’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/resource.h:100:30: note: in expansion of macro ‘CLIENT_BITS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:916:25: note: in expansion of macro ‘CLIENT_ID’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:137:5: note: in expansion of macro ‘xorg_list_for_each_entry_safe’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c: scope_hint: In function ‘DestroyFragments’ # 137| xorg_list_for_each_entry_safe(it, tmp, frags, l) { # 138| xorg_list_del(&it->l); # 139|-> free(it); # 140| } # 141| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c: scope_hint: In function ‘ProcXResQueryClients.part.0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:231:42: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘current_clients’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:226:23: note: in expansion of macro ‘xallocarray’ # 229| for (i = 0; i < currentMaxClients; i++) { # 230| if (clients[i]) { # 231|-> current_clients[num_clients] = i; # 232| num_clients++; # 233| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c: scope_hint: In function ‘SELinuxPopulateItem’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c:319:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘i’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/selection.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c:24: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c: scope_hint: In function ‘SELinuxPopulateItem’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c: scope_hint: In function ‘SELinuxPopulateItem’ # 317| return BadValue; # 318| # 319|-> i->id = id; # 320| i->octx_len = bytes_to_int32(strlen(i->octx) + 1); # 321| i->dctx_len = bytes_to_int32(strlen(i->dctx) + 1); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c: scope_hint: In function ‘SELinuxFreeItems’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c:333:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘items’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c: scope_hint: In function ‘SELinuxFreeItems’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c: scope_hint: In function ‘SELinuxFreeItems’ # 331| # 332| for (k = 0; k < count; k++) { # 333|-> freecon(items[k].octx); # 334| freecon(items[k].dctx); # 335| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c: scope_hint: In function ‘SELinuxSendItemsToClient’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c:355:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c: scope_hint: In function ‘SELinuxSendItemsToClient’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_ext.c: scope_hint: In function ‘SELinuxSendItemsToClient’ # 353| /* Fill in the buffer */ # 354| for (k = 0; k < count; k++) { # 355|-> buf[pos] = items[k].id; # 356| if (client->swapped) # 357| swapl(buf + pos); Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_label.c: scope_hint: In function ‘SELinuxAtomToSID’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_label.c:141:18: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:77: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/resource.h:49: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/registry.h:20: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_label.c:26: included_from: Included from here. # 139| if (!rec) { # 140| rec = calloc(1, sizeof(SELinuxAtomRec)); # 141|-> if (!rec || !SELinuxArraySet(&arr_atoms, atom, rec)) # 142| return BadAlloc; # 143| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xselinux_label.c:142:20: warning[unix.Malloc]: Potential leak of memory pointed to by 'rec' # 140| rec = calloc(1, sizeof(SELinuxAtomRec)); # 141| if (!rec || !SELinuxArraySet(&arr_atoms, atom, rec)) # 142|-> return BadAlloc; # 143| } # 144| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xtest.c: scope_hint: In function ‘ProcXTestFakeInput’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xtest.c:383:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dev’ # 381| case KeyPress: # 382| case KeyRelease: # 383|-> if (!dev->key) # 384| return BadDevice; # 385| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xtest.c:395:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dev’ # 393| break; # 394| case MotionNotify: # 395|-> if (!dev->valuator) # 396| return BadDevice; # 397| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xtest.c:426:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dev’ # 424| case ButtonPress: # 425| case ButtonRelease: # 426|-> if (!dev->button) # 427| return BadDevice; # 428| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xtest.c:440:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dev’ # 438| valuator_mask_set_range(&mask, firstValuator, numValuators, valuators); # 439| # 440|-> if (dev->sendEventsProc) # 441| (*dev->sendEventsProc) (dev, type, ev->u.u.detail, flags, &mask); # 442| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c:1782:21: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value # 1780| # 1781| FOR_NSCREENS(k) { # 1782|-> if (MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j)) # 1783| port->info[k].id = MatchingAdaptors[k]->base_id + j; # 1784| else Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c: scope_hint: In function ‘XineramifyXv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c:1787:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*port.info[0].id’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c:33: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c: scope_hint: In function ‘XineramifyXv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c:52: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c:1770:9: note: in expansion of macro ‘FOR_NSCREENS_FORWARD_SKIP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c: scope_hint: In function ‘XineramifyXv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c:1770:9: note: in expansion of macro ‘FOR_NSCREENS_FORWARD_SKIP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c: scope_hint: In function ‘XineramifyXv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c:1770:9: note: in expansion of macro ‘FOR_NSCREENS_FORWARD_SKIP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.h:74:25: note: in expansion of macro ‘FOR_NSCREENS_FORWARD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c:1781:13: note: in expansion of macro ‘FOR_NSCREENS’ # 1785| port->info[k].id = 0; # 1786| } # 1787|-> AddResource(port->info[0].id, XvXRTPort, port); # 1788| } # 1789| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvdisp.c:1787:13: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 1785| port->info[k].id = 0; # 1786| } # 1787|-> AddResource(port->info[0].id, XvXRTPort, port); # 1788| } # 1789| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xvmc.c:565:17: warning[core.NullDereference]: Access to field 'xvimage_ids' results in a dereference of a null pointer (loaded from field 'compatible_subpictures') # 563| pImage = NULL; # 564| for (j = 0; j < adaptor->num_subpictures; j++) { # 565|-> if (surface->compatible_subpictures->xvimage_ids[i] == # 566| adaptor->subpictures[j]->id) { # 567| pImage = adaptor->subpictures[j]; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:490:37: warning[core.NullDereference]: Access to field 'xkbInfo' results in a dereference of a null pointer (loaded from field 'key') # 488| continue; # 489| if (k->xkb_sli->flags & XkbSLI_IsDefault) { # 490|-> k->xkb_sli->names = to->key->xkbInfo->desc->names->indicators; # 491| k->xkb_sli->maps = to->key->xkbInfo->desc->indicators->maps; # 492| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c: scope_hint: In function ‘DeepCopyKeyboardClasses’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:490:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*to.key’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/input.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/inputstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:85: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:2392:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:2393:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:2394:5: note: in expansion of macro ‘BUG_RETURN_VAL’ # 488| continue; # 489| if (k->xkb_sli->flags & XkbSLI_IsDefault) { # 490|-> k->xkb_sli->names = to->key->xkbInfo->desc->names->indicators; # 491| k->xkb_sli->maps = to->key->xkbInfo->desc->indicators->maps; # 492| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:523:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 521| if (!to->focus->trace && to->focus->traceSize) # 522| FatalError("[Xi] no memory for trace.\n"); # 523|-> memcpy(to->focus->trace, from->focus->trace, # 524| from->focus->traceSize * sizeof(WindowPtr)); # 525| to->focus->sourceid = from->id; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:1043:37: warning[core.NullDereference]: Access to field 'inputClients' results in a dereference of a null pointer # 1041| InputClients *iclient; # 1042| # 1043|-> nt_list_for_each_entry(iclient, wOtherInputMasks(win)->inputClients, next) { # 1044| if (rClient(iclient) != client) # 1045| continue; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:1097:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 1095| if (XaceHook(XACE_RECEIVE_ACCESS, client, win, xi2, 1) != Success) # 1096| return FALSE; # 1097|-> err = TryClientEvents(client, dev, xi2, 1, filter, filter, NullGrab); # 1098| free(xi2); # 1099| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:1389:36: warning[core.NullDereference]: Access to field 'inputClients' results in a dereference of a null pointer # 1387| # 1388| nt_list_for_each_entry(iclients, # 1389|-> wOtherInputMasks(*win)->inputClients, next) # 1390| if (xi2mask_isset(iclients->xi2mask, dev, evtype)) # 1391| break; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:1403:36: warning[core.NullDereference]: Access to field 'inputClients' results in a dereference of a null pointer # 1401| # 1402| nt_list_for_each_entry(iclients, # 1403|-> wOtherInputMasks(*win)->inputClients, next) # 1404| if (iclients->mask[dev->id] & xi_filter) # 1405| break; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:1447:13: warning[deadcode.DeadStores]: Value stored to 'xi2mask' is never read # 1445| if (grab) { # 1446| win = grab->window; # 1447|-> xi2mask = grab->xi2mask; # 1448| client = rClient(grab); # 1449| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:1448:13: warning[deadcode.DeadStores]: Value stored to 'client' is never read # 1446| win = grab->window; # 1447| xi2mask = grab->xi2mask; # 1448|-> client = rClient(grab); # 1449| } # 1450| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:2243:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 2241| if (XaceHook(XACE_RECEIVE_ACCESS, client, win, xi2, 1) != Success) # 2242| return FALSE; # 2243|-> err = TryClientEvents(client, dev, xi2, 1, filter, filter, NullGrab); # 2244| free(xi2); # 2245| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:2291:42: warning[core.NullDereference]: Access to field 'inputClients' results in a dereference of a null pointer # 2289| evtype = GetXI2Type(ev->any.type); # 2290| # 2291|-> nt_list_for_each_entry(iclients, wOtherInputMasks(*win)->inputClients, next) # 2292| if (xi2mask_isset(iclients->xi2mask, dev, evtype)) # 2293| break; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c: scope_hint: In function ‘SelectForWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:2680:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:92: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:190:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:2680:23: note: in expansion of macro ‘wOtherInputMasks’ # 2678| } # 2679| } # 2680|-> for (others = wOtherInputMasks(pWin)->inputClients; others; # 2681| others = others->next) { # 2682| if (SameClient(others, client)) { Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c: scope_hint: In function ‘MakeInputMasks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:2768:32: warning[-Wanalyzer-malloc-leak]: leak of ‘imasks’ # 2766| return FALSE; # 2767| } # 2768|-> pWin->optional->inputMasks = imasks; # 2769| return TRUE; # 2770| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:2953:26: warning[core.NullDereference]: Array access (via field 'dontPropagateMask') results in a null pointer dereference # 2951| return Success; # 2952| if (wOtherInputMasks(pWin)) # 2953|-> mask &= ~wOtherInputMasks(pWin)->dontPropagateMask[d->id]; # 2954| if (!mask) # 2955| break; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:3242:22: warning[core.NullDereference]: Access to field 'resource' results in a dereference of a null pointer (loaded from field 'inputClients') # 3240| RecalculateDeviceDeliverableEvents(pWin); # 3241| if (ShouldFreeInputMasks(pWin, FALSE)) # 3242|-> FreeResource(inputMasks->inputClients->resource, RT_NONE); # 3243| return Success; # 3244| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c: scope_hint: In function ‘DeviceEventSuppressForWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:3242:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘inputMasks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:190:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:3237:22: note: in expansion of macro ‘wOtherInputMasks’ # 3240| RecalculateDeviceDeliverableEvents(pWin); # 3241| if (ShouldFreeInputMasks(pWin, FALSE)) # 3242|-> FreeResource(inputMasks->inputClients->resource, RT_NONE); # 3243| return Success; # 3244| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c: scope_hint: In function ‘XISetEventMask’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:3336:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c: scope_hint: In function ‘XISetEventMask’ /usr/include/X11/extensions/XI2proto.h:61: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/inputstr.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:190:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:3336:18: note: in expansion of macro ‘wOtherInputMasks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:190:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:3336:18: note: in expansion of macro ‘wOtherInputMasks’ # 3334| if (AddExtensionClient(win, client, 0, 0) != Success) # 3335| return BadAlloc; # 3336|-> others = wOtherInputMasks(win)->inputClients; # 3337| } # 3338| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/exevents.c:3336:18: warning[core.NullDereference]: Access to field 'inputClients' results in a dereference of a null pointer # 3334| if (AddExtensionClient(win, client, 0, 0) != Success) # 3335| return BadAlloc; # 3336|-> others = wOtherInputMasks(win)->inputClients; # 3337| } # 3338| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getprop.c: scope_hint: In function ‘ClassFromMask’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getprop.c:163:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/inputstr.h:55: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getprop.c:57: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getprop.c:102:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getprop.c:58: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:190:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getprop.c:116:19: note: in expansion of macro ‘wOtherInputMasks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:190:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getprop.c:116:19: note: in expansion of macro ‘wOtherInputMasks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/input.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/inputstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getprop.c:121:19: note: in expansion of macro ‘xallocarray’ # 161| (*count)++; # 162| else # 163|-> *buf++ = (id << 8) | EventInfo[j].type; # 164| } # 165| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/listdev.c: scope_hint: In function ‘CopySwapDevice’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/listdev.c:171:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dev’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/inputstr.h:55: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/listdev.c:59: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/listdev.c:343:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ # 169| dev = (xDeviceInfoPtr) * buf; # 170| # 171|-> dev->id = d->id; # 172| dev->type = d->xinput_type; # 173| dev->num_classes = num_classes; Error: GCC_ANALYZER_WARNING (CWE-415): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c:125:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘pbd’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c:124:5: note: in expansion of macro ‘xorg_list_for_each_entry_safe’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c:124:5: note: in expansion of macro ‘xorg_list_for_each_entry_safe’ # 123| # 124| xorg_list_for_each_entry_safe(pbd, tmp, &c->per_device, entry) { # 125|-> free(pbd); # 126| } # 127| free(c); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c:480:18: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'nevents') # 478| barrier_events->barrier_event = ev; # 479| barrier_events++; # 480|-> *nevents += 1; # 481| } # 482| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c:514:18: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'nevents') # 512| barrier_events->barrier_event = ev; # 513| barrier_events++; # 514|-> *nevents += 1; # 515| # 516| /* If we've left the hit box, this is the Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c: scope_hint: In function ‘add_master_func’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c:716:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘AllocBarrierDevice()’ # 714| # 715| pbd = AllocBarrierDevice(); # 716|-> pbd->deviceid = *deviceid; # 717| # 718| input_lock(); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xichangecursor.c:93:21: warning[core.NullDereference]: Dereference of null pointer # 91| # 92| if (stuff->cursor == None) { # 93|-> if (pWin == pWin->drawable.pScreen->root) # 94| pCursor = rootCursor; # 95| else Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xiquerydevice.c:127:9: warning[deadcode.DeadStores]: Value stored to 'info' is never read # 125| if (client->swapped) # 126| SwapDeviceInfo(dev, (xXIDeviceInfo *) info); # 127|-> info += len; # 128| rep.num_devices = 1; # 129| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xiquerydevice.c:546:20: warning[unix.Malloc]: Use of memory allocated with size zero # 544| int len = 0, total_len = 0; # 545| # 546|-> info->deviceid = dev->id; # 547| info->use = GetDeviceUse(dev, &info->attachment); # 548| info->num_classes = 0; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xiquerydevice.c:619:9: warning[deadcode.DeadStores]: Value stored to 'any' is never read # 617| (*nclasses)++; # 618| len = ListGestureInfo(dev, (xXIGestureInfo *) any); # 619|-> any += len; # 620| total_len += len; # 621| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:309:49: warning[core.NullDereference]: Dereference of null pointer # 307| } # 308| # 309|-> rc = XaceHook(XACE_RESOURCE_ACCESS, client, cs->pOverlayWin->drawable.id, # 310| RT_WINDOW, cs->pOverlayWin, RT_NONE, NULL, DixGetAttrAccess); # 311| if (rc != Success) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:755:14: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 753| } # 754| # 755|-> if (!AddResource(newPix->info[i].id, RT_PIXMAP, (void *) pPixmap)) # 756| return BadAlloc; # 757| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:756:20: warning[unix.Malloc]: Potential leak of memory pointed to by 'newPix' # 754| # 755| if (!AddResource(newPix->info[i].id, RT_PIXMAP, (void *) pPixmap)) # 756|-> return BadAlloc; # 757| # 758| ++pPixmap->refcnt; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:829:23: warning[core.NullDereference]: Dereference of null pointer # 827| # 828| rc = XaceHook(XACE_RESOURCE_ACCESS, client, # 829|-> cs->pOverlayWin->drawable.id, # 830| RT_WINDOW, cs->pOverlayWin, RT_NONE, NULL, # 831| DixGetAttrAccess); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:845:9: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 843| } # 844| # 845|-> AddResource(overlayWin->info[0].id, XRT_WINDOW, overlayWin); # 846| } # 847| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/cursor.c:435:13: warning[core.NullDereference]: Access to field 'refcnt' results in a dereference of a null pointer (loaded from variable 'sourcefont') # 433| } # 434| pShare->font = sourcefont; # 435|-> sourcefont->refcnt++; # 436| pShare->sourceChar = sourceChar; # 437| pShare->maskChar = maskChar; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/devices.c:402:11: warning[deadcode.DeadStores]: Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret' # 400| input_lock(); # 401| if ((*prev != dev) || !dev->inited || # 402|-> ((ret = (*dev->deviceProc) (dev, DEVICE_ON)) != Success)) { # 403| ErrorF("[dix] couldn't enable device %d\n", dev->id); # 404| input_unlock(); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/devices.c:1665:9: warning[deadcode.DeadStores]: Value stored to 'num_axes' is never read # 1663| "Device '%s' has %d touch axes, only using first %d.\n", # 1664| device->name, num_axes, MAX_VALUATORS); # 1665|-> num_axes = MAX_VALUATORS; # 1666| } # 1667| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/devices.c: scope_hint: In function ‘GetPairedDevice’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/devices.c:2728:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dev’ # 2726| dev = GetMaster(dev, MASTER_ATTACHED); # 2727| # 2728|-> return dev->spriteInfo? dev->spriteInfo->paired: NULL; # 2729| } # 2730| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dispatch.c:371:65: warning[core.NullDereference]: Access to field 'index' results in a dereference of a null pointer (loaded from variable 'best') # 369| } # 370| #endif # 371|-> SmartLastIndex[best->smart_priority - SMART_MIN_PRIORITY] = best->index; # 372| /* # 373| * Set current client pointer Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dispatch.c:3699:5: warning[deadcode.DeadStores]: Value stored to 'numScreens' is never read # 3697| } # 3698| # 3699|-> numScreens = screenInfo.numScreens; # 3700| lConnectionInfo = ConnectionInfo; # 3701| lconnSetupPrefix = &connSetupPrefix; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:443:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'c' # 441| c->non_cachable_font = cached; # 442| # 443|-> (void) doOpenFont(client, c); # 444| return Success; # 445| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:542:9: warning[deadcode.DeadStores]: Value stored to 'i' is never read # 540| (*pFont->get_metrics) (pFont, ncols, chars, # 541| TwoD16Bit, &count, charInfos); # 542|-> i = 0; # 543| for (i = 0; i < (int) count && ninfos < nProtoCCIStructs; i++) { # 544| *prCI = *charInfos[i]; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:573:9: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 571| (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); # 572| } # 573|-> err = Successful; # 574| goto bail; # 575| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:593:22: warning[unix.Malloc]: Potential leak of memory pointed to by 'resolved' # 591| # 592| if (err == Suspended) { # 593|-> if (!ClientIsAsleep(client)) # 594| ClientSleep(client, # 595| (ClientSleepProcPtr) doListFontsAndAliases, c); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:674:17: warning[core.CallAndMessage]: 3rd function call argument is an uninitialized value # 672| * is complete. # 673| */ # 674|-> memcpy(tmp_pattern, resolved, resolvedlen); # 675| if (c->haveSaved) { # 676| char *tmpname; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:674:17: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 672| * is complete. # 673| */ # 674|-> memcpy(tmp_pattern, resolved, resolvedlen); # 675| if (c->haveSaved) { # 676| char *tmpname; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:684:25: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 682| &tmpname, &tmpnamelen, c->current.private); # 683| if (--aliascount <= 0) { # 684|-> err = BadFontName; # 685| goto ContBadFontName; # 686| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:864:9: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 862| (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); # 863| } # 864|-> err = Successful; # 865| goto bail; # 866| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:923:21: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 921| &numFonts, c->current.private); # 922| if (--aliascount <= 0) { # 923|-> err = BadFontName; # 924| goto ContBadFontName; # 925| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:930:34: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 928| c->saved = c->current; # 929| c->haveSaved = TRUE; # 930|-> c->savedNumFonts = numFonts; # 931| free(c->savedName); # 932| c->savedName = malloc(namelen + 1); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:932:47: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value # 930| c->savedNumFonts = numFonts; # 931| free(c->savedName); # 932|-> c->savedName = malloc(namelen + 1); # 933| if (c->savedName) # 934| memcpy(c->savedName, name, namelen + 1); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:954:13: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 952| c->current.list_started = FALSE; # 953| c->current.current_fpe++; # 954|-> err = Successful; # 955| if (c->haveSaved) { # 956| if (c->current.max_names == 0 || Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:972:21: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 970| reply = (xListFontsWithInfoReply *) realloc(c->reply, length); # 971| if (!reply) { # 972|-> err = AllocError; # 973| break; # 974| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c: scope_hint: In function ‘doPolyText’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1315:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘origGC’ # 1313| if (client_state == START_SLEEP) { # 1314| /* Step 4 */ # 1315|-> if (pFont != origGC->font) { # 1316| ChangeGCVal val; # 1317| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1345:9: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 1343| # 1344| FreeScratchGC(c->pGC); # 1345|-> free(c->data); # 1346| free(c); # 1347| } Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1345:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*c.data’ # 1343| # 1344| FreeScratchGC(c->pGC); # 1345|-> free(c->data); # 1346| free(c); # 1347| } Error: GCC_ANALYZER_WARNING (CWE-590): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1346:9: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘c’ which points to memory on the stack # 1344| FreeScratchGC(c->pGC); # 1345| free(c->data); # 1346|-> free(c); # 1347| } # 1348| return TRUE; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1444:18: warning[deadcode.DeadStores]: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err' # 1442| goto bail; # 1443| } # 1444|-> if ((err = CopyGC(c->pGC, pGC, GCFunction | GCPlaneMask | # 1445| GCForeground | GCBackground | GCFillStyle | # 1446| GCTile | GCStipple | GCTileStipXOrigin | Error: GCC_ANALYZER_WARNING (CWE-590): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c: scope_hint: In function ‘doImageText’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1492:9: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘c’ which points to memory on the stack # 1490| FreeScratchGC(c->pGC); # 1491| free(c->data); # 1492|-> free(c); # 1493| } # 1494| return TRUE; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1492:9: warning[unix.Malloc]: Argument to free() is the address of the local variable 'local_closure', which is not memory allocated by malloc() # 1490| FreeScratchGC(c->pGC); # 1491| free(c->data); # 1492|-> free(c); # 1493| } # 1494| return TRUE; Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c: scope_hint: In function ‘SetFontPath’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1690:28: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bad’ # 1688| # 1689| err = SetFontPathElements(npaths, paths, &bad, FALSE); # 1690|-> client->errorValue = bad; # 1691| } # 1692| return err; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1690:28: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1688| # 1689| err = SetFontPathElements(npaths, paths, &bad, FALSE); # 1690|-> client->errorValue = bad; # 1691| } # 1692| return err; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/dixfonts.c:1776:9: warning[unix.Malloc]: Attempt to free released memory # 1774| c = realloc(font_path_string, len); # 1775| if (c == NULL) { # 1776|-> free(font_path_string); # 1777| font_path_string = NULL; # 1778| return BadAlloc; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/enterleave.c: scope_hint: In function ‘DeviceFocusEvent’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/enterleave.c:777:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xi2event’ # 775| # 776| xi2event = calloc(1, len); # 777|-> xi2event->type = GenericEvent; # 778| xi2event->extension = IReqCode; # 779| xi2event->evtype = type; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c: scope_hint: In function ‘eventToDeviceEvent’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c:687:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*xi’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c: scope_hint: In function ‘eventToDeviceEvent’ # 685| *xi = calloc(1, len); # 686| xde = (xXIDeviceEvent *) * xi; # 687|-> xde->type = GenericEvent; # 688| xde->extension = IReqCode; # 689| xde->evtype = GetXI2Type(ev->type); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c: scope_hint: In function ‘eventToTouchOwnershipEvent’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c:755:16: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*xi’ # 753| *xi = calloc(1, len); # 754| xtoe = (xXITouchOwnershipEvent *) * xi; # 755|-> xtoe->type = GenericEvent; # 756| xtoe->extension = IReqCode; # 757| xtoe->length = bytes_to_int32(len - sizeof(xEvent)); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c: scope_hint: In function ‘eventToRawEvent’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c:785:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*xi’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c: scope_hint: In function ‘eventToRawEvent’ # 783| *xi = calloc(1, len); # 784| raw = (xXIRawEvent *) * xi; # 785|-> raw->type = GenericEvent; # 786| raw->extension = IReqCode; # 787| raw->evtype = GetXI2Type(ev->type); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c: scope_hint: In function ‘eventToBarrierEvent’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c:820:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*xi’ # 818| *xi = calloc(1, len); # 819| barrier = (xXIBarrierEvent*) *xi; # 820|-> barrier->type = GenericEvent; # 821| barrier->extension = IReqCode; # 822| barrier->evtype = GetXI2Type(ev->type); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c: scope_hint: In function ‘eventToGesturePinchEvent’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c:849:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*xi’ # 847| *xi = calloc(1, len); # 848| xpe = (xXIGesturePinchEvent *) * xi; # 849|-> xpe->type = GenericEvent; # 850| xpe->extension = IReqCode; # 851| xpe->evtype = GetXI2Type(ev->type); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c: scope_hint: In function ‘eventToGestureSwipeEvent’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/eventconvert.c:891:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*xi’ # 889| *xi = calloc(1, len); # 890| xde = (xXIGestureSwipeEvent *) * xi; # 891|-> xde->type = GenericEvent; # 892| xde->extension = IReqCode; # 893| xde->evtype = GetXI2Type(ev->type); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/events.c: scope_hint: In function ‘CheckPhysLimits’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/events.c:771:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pScreen’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h:151: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/pixmapstr.h:52: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:51: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/events.c:112: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/events.c:5110:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/events.c:110: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/resource.h:98:27: note: in definition of macro ‘CLIENT_BITS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/events.c:5132:10: note: in expansion of macro ‘SameClient’ # 769| if (pScreen != pSprite->hotPhys.pScreen) # 770| pSprite->hotPhys = new; # 771|-> (*pScreen->SetCursorPosition) # 772| (pDev, pScreen, new.x, new.y, generateEvents); # 773| } Error: GCC_ANALYZER_WARNING (CWE-122): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/extension.c: scope_hint: In function ‘ProcListExtensions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/extension.c:295:23: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/extension.c:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/extension.c:264:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/extension.c:295:23: note: write of 1 byte to beyond the end of the region # 293| continue; # 294| # 295|-> *bufptr++ = len = strlen(extensions[i]->name); # 296| memcpy(bufptr, extensions[i]->name, len); # 297| bufptr += len; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/extension.c:295:23: warning[unix.Malloc]: Use of memory allocated with size zero # 293| continue; # 294| # 295|-> *bufptr++ = len = strlen(extensions[i]->name); # 296| memcpy(bufptr, extensions[i]->name, len); # 297| bufptr += len; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gc.c: scope_hint: In function ‘CreateScratchGC’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gc.c:814:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pGC’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gc.c:66: included_from: Included from here. # 812| pGC = (GCPtr) NULL; # 813| } # 814|-> pGC->graphicsExposures = FALSE; # 815| return pGC; # 816| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gc.c:814:28: warning[core.NullDereference]: Access to field 'graphicsExposures' results in a dereference of a null pointer (loaded from variable 'pGC') # 812| pGC = (GCPtr) NULL; # 813| } # 814|-> pGC->graphicsExposures = FALSE; # 815| return pGC; # 816| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/getevents.c:830:9: warning[core.NullDereference]: Dereference of null pointer # 828| accelPointer(DeviceIntPtr dev, ValuatorMask *valuators, CARD32 ms) # 829| { # 830|-> if (dev->valuator->accelScheme.AccelSchemeProc) # 831| dev->valuator->accelScheme.AccelSchemeProc(dev, valuators, ms); # 832| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/inpututils.c:789:9: warning[core.NullDereference]: Array access (via field 'map') results in a null pointer dereference # 787| # 788| if (mouse && mouse->touch && mouse->touch->buttonsDown > 0) # 789|-> SetBit(event->buttons, mouse->button->map[1]); # 790| # 791| if (kbd && kbd->key) { Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/privates.c: scope_hint: In function ‘dixAllocatePrivates’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/privates.c:522:5: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h:18: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/pixmapstr.h:52: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:51: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/privates.c:56: included_from: Included from here. # 520| # 521| _dixInitPrivates(privates, p, type); # 522|-> ++global_keys[type].allocated; # 523| # 524| return TRUE; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/privates.c:522:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'p' # 520| # 521| _dixInitPrivates(privates, p, type); # 522|-> ++global_keys[type].allocated; # 523| # 524| return TRUE; Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c: scope_hint: In function ‘dixChangeWindowProperty’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:283:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘data’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/pixmapstr.h:52: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:51: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:275:17: note: in expansion of macro ‘dixAllocateObjectWithPrivates’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 281| return BadAlloc; # 282| } # 283|-> memcpy(data, value, totalSize); # 284| pProp->propertyName = property; # 285| pProp->type = type; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:297:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*pWin.optional’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h:151: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:213:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:231:5: note: in expansion of macro ‘REQUEST_FIXED_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:192:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:98:18: note: in expansion of macro ‘wUserProps’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:275:17: note: in expansion of macro ‘dixAllocateObjectWithPrivates’ # 295| return rc; # 296| } # 297|-> pProp->next = pWin->optional->userProps; # 298| pWin->optional->userProps = pProp; # 299| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:318:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘data’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:192:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:98:18: note: in expansion of macro ‘wUserProps’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:192:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:98:18: note: in expansion of macro ‘wUserProps’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 316| if (!data && len) # 317| return BadAlloc; # 318|-> memcpy(data, value, totalSize); # 319| pProp->data = data; # 320| pProp->size = len; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c: scope_hint: In function ‘ProcListProperties’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:597:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘temppAtoms’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:580:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:192:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:585:18: note: in expansion of macro ‘wUserProps’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:192:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:585:18: note: in expansion of macro ‘wUserProps’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:192:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:585:18: note: in expansion of macro ‘wUserProps’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:192:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:593:18: note: in expansion of macro ‘wUserProps’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:192:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/property.c:593:18: note: in expansion of macro ‘wUserProps’ # 595| rc = XaceHookPropertyAccess(client, pWin, &realProp, DixGetAttrAccess); # 596| if (rc == Success && realProp == pProp) { # 597|-> *temppAtoms++ = pProp->propertyName; # 598| numProps++; # 599| } Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/ptrveloc.c: scope_hint: In function ‘InitPredictableAccelerationScheme’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/ptrveloc.c:146:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 144| scheme.accelData = schemeData; # 145| if (!InitializePredictableAccelerationProperties(dev, vel, schemeData)) { # 146|-> free(vel); # 147| free(schemeData); # 148| return FALSE; Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/ptrveloc.c:151:32: warning[-Wanalyzer-malloc-leak]: leak of ‘schemeData’ # 149| } # 150| /* all fine, assign scheme to device */ # 151|-> dev->valuator->accelScheme = scheme; # 152| return TRUE; # 153| } Error: GCC_ANALYZER_WARNING (CWE-590): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/region.c: scope_hint: In function ‘RegionBreak’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/region.c:172:62: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘&RegionEmptyData’ which points to memory not on the heap xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/region.c:338:5: note: in expansion of macro ‘xfreeData’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/region.c:82: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/region.c:338:5: note: in expansion of macro ‘xfreeData’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/region.c:338:5: note: in expansion of macro ‘xfreeData’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/region.c:338:5: note: in expansion of macro ‘xfreeData’ # 170| ((r1)->y2 >= (r2)->y2) ) # 171| # 172|-> #define xfreeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data) # 173| # 174| #define RECTALLOC_BAIL(pReg,n,bail) \ Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/region.c:338:5: warning[unix.Malloc]: Argument to free() is the address of the global variable 'RegionEmptyData', which is not memory allocated by malloc() # 336| RegionBreak(RegionPtr pReg) # 337| { # 338|-> xfreeData(pReg); # 339| pReg->extents = RegionEmptyBox; # 340| pReg->data = &RegionBrokenData; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/region.c:1310:9: warning[unix.Malloc]: Argument to free() is the address of the global variable 'RegionBrokenData', which is not memory allocated by malloc() # 1308| bail: # 1309| for (i = 0; i < numRI; i++) # 1310|-> xfreeData(&ri[i].reg); # 1311| free(ri); # 1312| return RegionBreak(badreg); Error: GCC_ANALYZER_WARNING (CWE-131): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/swaprep.c: scope_hint: In function ‘CopySwap32Write’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/swaprep.c:99:22: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size # 97| # 98| /* Allocate as big a buffer as we can... */ # 99|-> while (!(pbufT = malloc(bufsize))) { # 100| bufsize >>= 1; # 101| if (bufsize == 4) { Error: GCC_ANALYZER_WARNING (CWE-131): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/swaprep.c: scope_hint: In function ‘CopySwap16Write’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/swaprep.c:146:22: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size # 144| # 145| /* Allocate as big a buffer as we can... */ # 146|-> while (!(pbufT = malloc(bufsize))) { # 147| bufsize >>= 1; # 148| if (bufsize == 4) { Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/window.c: scope_hint: In function ‘ChangeWindowDeviceCursor’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/window.c:3495:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pNewNode’ # 3493| # 3494| pNewNode = malloc(sizeof(DevCursNodeRec)); # 3495|-> pNewNode->dev = pDev; # 3496| pNewNode->next = pWin->optional->deviceCursors; # 3497| pWin->optional->deviceCursors = pNewNode; Error: GCC_ANALYZER_WARNING (CWE-126): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c: scope_hint: In function ‘dri3_fd_from_pixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c:143:13: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_priv.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘dri3_fd_from_pixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c: scope_hint: In function ‘dri3_fd_from_pixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c: scope_hint: In function ‘dri3_fd_from_pixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c:143:13: note: read of 4 bytes from after the end of ‘fds’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c:143:13: note: valid subscripts for ‘fds’ are ‘[0]’ to ‘[3]’ # └───────────────────────┘ # ^ # 141| int i; # 142| for (i = 0; i < num_fds; i++) # 143|-> close(fds[i]); # 144| return -1; # 145| } Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c: scope_hint: In function ‘cache_formats_and_modifiers’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c:186:8: warning[-Wanalyzer-malloc-leak]: leak of ‘((struct dri3_screen_priv)**screen.devPrivates).formats’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘cache_formats_and_modifiers’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c: scope_hint: In function ‘cache_formats_and_modifiers’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dri3/dri3_screen.c: scope_hint: In function ‘cache_formats_and_modifiers’ # 184| # 185| ds->formats = calloc(num_formats, sizeof(dri3_dmabuf_format_rec)); # 186|-> if (!ds->formats) # 187| return BadAlloc; # 188| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c: scope_hint: In function ‘glamor_close_screen’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c:944:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/pixmapstr.h:55: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.h:33: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c:37: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c:927:27: note: in expansion of macro ‘GetPictureScreenIfSet’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_close_screen’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c: scope_hint: In function ‘glamor_close_screen’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c: scope_hint: In function ‘glamor_close_screen’ # 942| screen->BlockHandler = glamor_priv->saved_procs.block_handler; # 943| # 944|-> ps->Composite = glamor_priv->saved_procs.composite; # 945| ps->Trapezoids = glamor_priv->saved_procs.trapezoids; # 946| ps->Triangles = glamor_priv->saved_procs.triangles; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c: scope_hint: In function ‘_glamor_fds_from_pixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c:1017:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c: scope_hint: In function ‘_glamor_fds_from_pixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘_glamor_fds_from_pixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c: scope_hint: In function ‘_glamor_fds_from_pixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c: scope_hint: In function ‘_glamor_fds_from_pixmap’ # 1015| if (!glamor_priv->dri3_enabled) # 1016| return 0; # 1017|-> switch (pixmap_priv->type) { # 1018| case GLAMOR_TEXTURE_DRM: # 1019| case GLAMOR_TEXTURE_ONLY: Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c: scope_hint: In function ‘glamor_name_from_pixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c:1094:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c: scope_hint: In function ‘glamor_name_from_pixmap’ # 1092| glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); # 1093| # 1094|-> switch (pixmap_priv->type) { # 1095| case GLAMOR_TEXTURE_DRM: # 1096| case GLAMOR_TEXTURE_ONLY: Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c:431:59: warning[core.NullDereference]: Access to field 'serial' results in a dereference of a null pointer (loaded from variable 'glyph_atlas') # 429| /* Glyph not cached in current atlas? # 430| */ # 431|-> if (_X_UNLIKELY(glyph_priv->serial != glyph_atlas->serial)) { # 432| if (!glamor_glyph_can_add(glyph_atlas, glyph_atlas_dim, glyph_draw)) { # 433| if (glyphs_queued) { Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_composite_glyphs’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c:431:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘glyph_atlas’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_composite_glyphs’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_composite_glyphs’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_composite_glyphs’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_composite_glyphs’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_composite_glyphs’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_composite_glyphs’ # 429| /* Glyph not cached in current atlas? # 430| */ # 431|-> if (_X_UNLIKELY(glyph_priv->serial != glyph_atlas->serial)) { # 432| if (!glamor_glyph_can_add(glyph_atlas, glyph_atlas_dim, glyph_draw)) { # 433| if (glyphs_queued) { Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_core.c: scope_hint: In function ‘glamor_get_drawable_location’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_core.c:44:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_core.c: scope_hint: In function ‘glamor_get_drawable_location’ # 42| glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); # 43| # 44|-> if (pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) # 45| return 'm'; # 46| else Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c:287:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_attach_fbo’ # 285| pixmap_priv = glamor_get_pixmap_private(pixmap); # 286| # 287|-> if (pixmap_priv->fbo) # 288| return; # 289| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c:355:12: warning[unix.Malloc]: Potential leak of memory pointed to by 'fbo' # 353| } # 354| # 355|-> return TRUE; # 356| } # 357| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_exchange_fbos’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c:366:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_exchange_fbos’ # 364| front_priv = glamor_get_pixmap_private(front); # 365| back_priv = glamor_get_pixmap_private(back); # 366|-> temp_fbo = front_priv->fbo; # 367| front_priv->fbo = back_priv->fbo; # 368| back_priv->fbo = temp_fbo; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c:367:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_pixmap_exchange_fbos’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_exchange_fbos’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_exchange_fbos’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_exchange_fbos’ # 365| back_priv = glamor_get_pixmap_private(back); # 366| temp_fbo = front_priv->fbo; # 367|-> front_priv->fbo = back_priv->fbo; # 368| back_priv->fbo = temp_fbo; # 369| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c:130:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘__glamor_compute_clipped_regions’ # 128| DEBUGRegionPrint(current_region); # 129| if (RegionNumRects(current_region)) { # 130|-> clipped_regions[k].region = current_region; # 131| clipped_regions[k].block_idx = temp_block_idx; # 132| k++; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c:235:38: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_compute_clipped_regions_ext’ # 233| reverse, upsidedown); # 234| for (j = 0; j < inner_n_regions; j++) { # 235|-> result_regions[k].region = inner_regions[j].region; # 236| result_regions[k].block_idx = clipped_regions[i].block_idx; # 237| k++; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘_glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c:365:35: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘_glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘_glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘_glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘_glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘_glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘_glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘_glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘_glamor_compute_clipped_regions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘_glamor_compute_clipped_regions’ # 363| if (glamor_pixmap_priv_is_small(pixmap_priv)) { # 364| clipped_regions = calloc(1, sizeof(*clipped_regions)); # 365|-> clipped_regions[0].region = RegionCreate(NULL, 1); # 366| clipped_regions[0].block_idx = 0; # 367| RegionCopy(clipped_regions[0].region, region); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c:1133:12: warning[core.NullDereference]: Access to field 'transform' results in a dereference of a null pointer (loaded from variable 'mask') # 1131| # 1132| if (mask_pixmap_priv # 1133|-> && mask->transform && glamor_pixmap_priv_is_large(mask_pixmap_priv)) { # 1134| int mask_transformed_block_width, mask_transformed_block_height; # 1135| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c:1175:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘source_pixmap_priv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_largepixmap.c: scope_hint: In function ‘glamor_composite_largepixmap_region’ # 1173| need_free_source_pixmap_priv = source_pixmap_priv; # 1174| source_pixmap_priv = malloc(sizeof(*source_pixmap_priv)); # 1175|-> *source_pixmap_priv = *need_free_source_pixmap_priv; # 1176| need_free_source_pixmap_priv = source_pixmap_priv; # 1177| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_picture.c:333:9: warning[deadcode.DeadStores]: Value stored to 'stride' is never read # 331| # 332| bits = pixman_image_get_data(converted_image); # 333|-> stride = pixman_image_get_stride(converted_image); # 334| } # 335| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_prepare.c: scope_hint: In function ‘glamor_prep_drawable_box’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_prepare.c:44:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_prepare.c: scope_hint: In function ‘glamor_prep_drawable_box’ # 42| int off_x, off_y; # 43| # 44|-> if (priv->type == GLAMOR_DRM_ONLY) # 45| return FALSE; # 46| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_render.c:35: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_drm_only’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:431:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_drm_only’ # 429| glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); # 430| # 431|-> return priv->type == GLAMOR_DRM_ONLY; # 432| } # 433| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c:25: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_is_memory’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:442:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/Xprintf.h:29: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c:23: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_is_memory’ # 440| glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); # 441| # 442|-> return priv->type == GLAMOR_MEMORY; # 443| } # 444| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_has_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:475:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_pixmap_has_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_has_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_pixmap_has_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_pixmap_has_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_pixmap_has_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_pixmap_has_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_has_fbo’ # 473| glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); # 474| # 475|-> return priv->gl_fbo == GLAMOR_FBO_NORMAL; # 476| } # 477| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_fbo_at’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:490:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘priv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_pixmap_fbo_at’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_fbo_at’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_pixmap_fbo_at’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_pixmap_fbo_at’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_pixmap_fbo_at’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_pixmap_fbo_at’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_pixmap_fbo_at’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_composite_glyphs.c: scope_hint: In function ‘glamor_pixmap_fbo_at’ # 488| glamor_pixmap_fbo_at(glamor_pixmap_private *priv, int box) # 489| { # 490|-> assert(box < priv->block_wcnt * priv->block_hcnt); # 491| return priv->fbo_array[box]; # 492| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h:18: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_transform.c:23: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h: scope_hint: In function ‘glamor_pixmap_box_at’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:497:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘priv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_transform.c: scope_hint: In function ‘glamor_pixmap_box_at’ # 495| glamor_pixmap_box_at(glamor_pixmap_private *priv, int box) # 496| { # 497|-> assert(box < priv->block_wcnt * priv->block_hcnt); # 498| return &priv->box_array[box]; # 499| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:510:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_dash.c: scope_hint: In function ‘glamor_dash_loop’ /usr/include/epoxy/gl.h:89: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:40: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_dash.c: scope_hint: In function ‘glamor_dash_loop’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_dash.c:213:5: note: in expansion of macro ‘glamor_pixmap_loop’ # 508| glamor_pixmap_hcnt(glamor_pixmap_private *priv) # 509| { # 510|-> return priv->block_hcnt; # 511| } # 512| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_render.c:245:17: warning[deadcode.DeadStores]: Value stored to 'mask_fetch' during its initialization is never read # 243| char *source; # 244| const char *source_fetch; # 245|-> const char *mask_fetch = ""; # 246| const char *in; # 247| const char *header; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_render.c:1045:9: warning[deadcode.DeadStores]: Value stored to 'mask_needs_upload' is never read # 1043| goto fail; # 1044| } # 1045|-> mask_needs_upload = FALSE; # 1046| } # 1047| else { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_render.c:1079:27: warning[core.NullDereference]: Access to field 'format' results in a dereference of a null pointer (loaded from variable 'mask') # 1077| */ # 1078| if (source_pixmap && source_pixmap == mask_pixmap && # 1079|-> source->format != mask->format) { # 1080| goto fail; # 1081| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_render.c:1314:36: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value # 1312| x_source = rects->x_src + source_x_off; # 1313| y_source = rects->y_src + source_y_off; # 1314|-> x_mask = rects->x_mask + mask_x_off; # 1315| y_mask = rects->y_mask + mask_y_off; # 1316| width = rects->width; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_transform.c:127:16: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 125| # 126| if ((depth <= 8) && glamor_priv->formats[8].format == GL_RED) # 127|-> color[0] = color[3]; # 128| # 129| glUniform4fv(uniform, 1, color); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:953: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_core.c: scope_hint: In function ‘glamor_validate_gc’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_utils.h:573:64: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_core.c:204:19: note: in expansion of macro ‘GLAMOR_PIXMAP_PRIV_HAS_FBO’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_core.c: scope_hint: In function ‘glamor_validate_gc’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_core.c:204:19: note: in expansion of macro ‘GLAMOR_PIXMAP_PRIV_HAS_FBO’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_core.c:204:19: note: in expansion of macro ‘GLAMOR_PIXMAP_PRIV_HAS_FBO’ # 571| && (_h_) <= _glamor_->max_fbo_size) # 572| # 573|-> #define GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv) (pixmap_priv->gl_fbo == GLAMOR_FBO_NORMAL) # 574| # 575| #define REVERT_NONE 0 Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:953: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c:31: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_utils.h: scope_hint: In function ‘glamor_pixmap_attach_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_utils.h:671:42: warning[-Wanalyzer-malloc-leak]: leak of ‘glamor_create_fbo(glamor_get_screen_private(*pixmap.drawable.pScreen), pixmap, (int)*pixmap.drawable.width, (int)*pixmap.drawable.height, flag)’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_pixmap_attach_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_attach_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_attach_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_pixmap_attach_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_attach_fbo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_fbo.c: scope_hint: In function ‘glamor_pixmap_attach_fbo’ # 669| glamor_make_current(glamor_screen_private *glamor_priv) # 670| { # 671|-> if (lastGLContext != glamor_priv->ctx.ctx) { # 672| lastGLContext = glamor_priv->ctx.ctx; # 673| glamor_priv->ctx.make_current(&glamor_priv->ctx); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.c:37: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:953: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_utils.h:673:9: warning[core.CallAndMessage]: Called function pointer is null (null dereference) # 671| if (lastGLContext != glamor_priv->ctx.ctx) { # 672| lastGLContext = glamor_priv->ctx.ctx; # 673|-> glamor_priv->ctx.make_current(&glamor_priv->ctx); # 674| } # 675| glamor_priv->dirty = TRUE; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c:342:5: warning[deadcode.DeadStores]: Value stored to 'gamma' is never read # 340| cont = RTFContrast(port_priv->contrast); # 341| bright = RTFBrightness(port_priv->brightness); # 342|-> gamma = (float) port_priv->gamma / 1000.0; # 343| uvcosf = RTFSaturation(port_priv->saturation) * cos(RTFHue(port_priv->hue)); # 344| uvsinf = RTFSaturation(port_priv->saturation) * sin(RTFHue(port_priv->hue)); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c:382:34: warning[core.NullDereference]: Access to field 'fbo' results in a dereference of a null pointer # 380| # 381| glActiveTexture(GL_TEXTURE0); # 382|-> glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[0]->fbo->tex); # 383| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); # 384| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c:389:34: warning[core.NullDereference]: Access to field 'fbo' results in a dereference of a null pointer # 387| # 388| glActiveTexture(GL_TEXTURE1); # 389|-> glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[1]->fbo->tex); # 390| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); # 391| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c: scope_hint: In function ‘glamor_xv_render’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c:389:49: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘src_pixmap_priv[1]’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:51: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c: scope_hint: In function ‘glamor_xv_render’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c:321:18: note: in expansion of macro ‘REGION_RECTS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c: scope_hint: In function ‘glamor_xv_render’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c:322:16: note: in expansion of macro ‘REGION_NUM_RECTS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c: scope_hint: In function ‘glamor_xv_render’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘glamor_xv_render’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c: scope_hint: In function ‘glamor_xv_render’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c: scope_hint: In function ‘glamor_xv_render’ # 387| # 388| glActiveTexture(GL_TEXTURE1); # 389|-> glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[1]->fbo->tex); # 390| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); # 391| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c:508:5: warning[deadcode.DeadStores]: Value stored to 's2offset' is never read # 506| BoxRec full_box, half_box; # 507| # 508|-> s2offset = s3offset = srcPitch2 = 0; # 509| # 510| if (!port_priv->src_pix[0] || Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c:508:16: warning[deadcode.DeadStores]: Although the value stored to 's3offset' is used in the enclosing expression, the value is never actually read from 's3offset' # 506| BoxRec full_box, half_box; # 507| # 508|-> s2offset = s3offset = srcPitch2 = 0; # 509| # 510| if (!port_priv->src_pix[0] || Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_xv.c:508:27: warning[deadcode.DeadStores]: Although the value stored to 'srcPitch2' is used in the enclosing expression, the value is never actually read from 'srcPitch2' # 506| BoxRec full_box, half_box; # 507| # 508|-> s2offset = s3offset = srcPitch2 = 0; # 509| # 510| if (!port_priv->src_pix[0] || Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/createcontext.c: scope_hint: In function ‘__glXDisp_CreateContextAttribsARB’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/createcontext.c:174:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 172| # 173| for (i = 0; i < req->numAttribs; i++) { # 174|-> switch (attribs[i * 2]) { # 175| case GLX_CONTEXT_MAJOR_VERSION_ARB: # 176| major_version = attribs[2 * i + 1]; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/glxcmds.c:126:9: warning[core.NullDereference]: Access to field 'class' results in a dereference of a null pointer (loaded from variable 'pVisual') # 124| # 125| /* FIXME: What exactly should we check here... */ # 126|-> if (pVisual->class != glxConvertToXVisualType(config->visualType) || # 127| !(config->drawableType & GLX_WINDOW_BIT)) { # 128| client->errorValue = pDraw->id; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/glxcmds.c: scope_hint: In function ‘validGlxFBConfigForWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/glxcmds.c:126:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pVisual’ # 124| # 125| /* FIXME: What exactly should we check here... */ # 126|-> if (pVisual->class != glxConvertToXVisualType(config->visualType) || # 127| !(config->drawableType & GLX_WINDOW_BIT)) { # 128| client->errorValue = pDraw->id; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/glxcmds.c:1001:13: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 999| assert(p == GLX_VIS_CONFIG_TOTAL); # 1000| if (client->swapped) { # 1001|-> __GLX_SWAP_INT_ARRAY(buf, p); # 1002| } # 1003| WriteToClient(client, __GLX_SIZE_CARD32 * p, buf); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/glxcmds.c:1125:13: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1123| # 1124| if (client->swapped) { # 1125|-> __GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH); # 1126| } # 1127| WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_FBCONFIG_ATTRIBS_LENGTH, Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/glxcmds.c:1702:9: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1700| __GLX_SWAP_INT(&reply.n); # 1701| WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, &reply); # 1702|-> __GLX_SWAP_INT_ARRAY((int *) sendBuf, length); # 1703| WriteToClient(client, length << 2, sendBuf); # 1704| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/glxcmds.c:1946:9: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1944| __GLX_SWAP_INT(&reply.numAttribs); # 1945| WriteToClient(client, sz_xGLXGetDrawableAttributesReply, &reply); # 1946|-> __GLX_SWAP_INT_ARRAY((int *) attributes, length); # 1947| WriteToClient(client, length << 2, attributes); # 1948| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/glxdricommon.c: scope_hint: In function ‘createModeFromConfig’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/glxdricommon.c:142:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘config’ # 140| config = calloc(1, sizeof *config); # 141| # 142|-> config->driConfig = driConfig; # 143| # 144| i = 0; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/indirect_dispatch.c:71:5: warning[deadcode.DeadStores]: Value stored to 'pc' is never read # 69| __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); # 70| # 71|-> pc += __GLX_SINGLE_HDR_SIZE; # 72| if (cx != NULL) { # 73| glEndList(); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/indirect_dispatch.c:91:19: warning[deadcode.DeadStores]: Value stored to 'lists' during its initialization is never read # 89| const GLsizei n = *(GLsizei *) (pc + 0); # 90| const GLenum type = *(GLenum *) (pc + 4); # 91|-> const GLvoid *lists = (const GLvoid *) (pc + 8); # 92| # 93| lists = (const GLvoid *) (pc + 8); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/indirect_dispatch.c:1588:5: warning[deadcode.DeadStores]: Value stored to 'pc' is never read # 1586| __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); # 1587| # 1588|-> pc += __GLX_SINGLE_HDR_SIZE; # 1589| if (cx != NULL) { # 1590| GLenum retval; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/indirect_dispatch_swap.c:175:5: warning[deadcode.DeadStores]: Value stored to 'pc' is never read # 173| __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); # 174| # 175|-> pc += __GLX_SINGLE_HDR_SIZE; # 176| if (cx != NULL) { # 177| glEndList(); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/indirect_dispatch_swap.c:1789:5: warning[deadcode.DeadStores]: Value stored to 'pc' is never read # 1787| __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); # 1788| # 1789|-> pc += __GLX_SINGLE_HDR_SIZE; # 1790| if (cx != NULL) { # 1791| GLenum retval; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/single2.c:174:13: warning[deadcode.DeadStores]: Value stored to 'nitems' is never read # 172| ** items in the buffer. # 173| */ # 174|-> nitems = 0; # 175| i = retval; # 176| while (--i >= 0) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/single2.c:315:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'combo_string' # 313| combo_string = strcat(combo_string, SEPARATOR); # 314| } # 315|-> p += (n + 1); # 316| } # 317| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glx/single2swap.c:185:13: warning[deadcode.DeadStores]: Value stored to 'nitems' is never read # 183| ** items in the buffer. # 184| */ # 185|-> nitems = 0; # 186| i = retval; # 187| while (--i >= 0) { Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/vfb/InitOutput.c: scope_hint: In function ‘vfbInstallColormap.part.0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/vfb/InitOutput.c:413:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ppix’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/screenint.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/vfb/InitOutput.c:40: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/vfb/InitOutput.c:408:16: note: in expansion of macro ‘xallocarray’ # 411| # 412| for (i = 0; i < entries; i++) # 413|-> ppix[i] = i; # 414| /* XXX truecolor */ # 415| QueryColors(pmap, entries, ppix, prgb, serverClient); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-drm-lease.c:144:13: warning[core.NullDereference]: Access to field 'drm_lease_device' results in a dereference of a null pointer (loaded from variable 'lease_device') # 142| # 143| req = wp_drm_lease_device_v1_create_lease_request( # 144|-> lease_device->drm_lease_device); # 145| lease_private = calloc(1, sizeof(struct xwl_drm_lease)); # 146| for (i = 0; i < rrLease->numOutputs; ++i) { Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-drm-lease.c: scope_hint: In function ‘xwl_screen_add_drm_lease_device’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-drm-lease.c:424:35: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘device_data’ # 422| struct xwl_drm_lease_device *device_data = malloc(sizeof(struct xwl_drm_lease_device)); # 423| # 424|-> device_data->drm_lease_device = lease_device; # 425| device_data->xwl_screen = xwl_screen; # 426| device_data->drm_read_only_fd = -1; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-glamor.c:955:10: warning[core.NullDereference]: Access to field 'class' results in a dereference of a null pointer (loaded from variable 'window_visual') # 953| } # 954| # 955|-> if ((window_visual->class != TrueColor && # 956| window_visual->class != DirectColor) || # 957| window_visual->redMask != parent_visual->redMask || Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-glamor.c: scope_hint: In function ‘xwl_avoid_implicit_redirect’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-glamor.c:955:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘window_visual’ # 953| } # 954| # 955|-> if ((window_visual->class != TrueColor && # 956| window_visual->class != DirectColor) || # 957| window_visual->redMask != parent_visual->redMask || Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-input.c: scope_hint: In function ‘xwl_pointer_warp_emulator_lock’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-input.c:3196:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘warp_emulator’ # 3194| xwl_pointer_warp_emulator_lock(struct xwl_pointer_warp_emulator *warp_emulator) # 3195| { # 3196|-> struct xwl_seat *xwl_seat = warp_emulator->xwl_seat; # 3197| struct xwl_screen *xwl_screen = xwl_seat->xwl_screen; # 3198| struct zwp_pointer_constraints_v1 *pointer_constraints = Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-input.c:3197:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xwl_seat’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-input.c: scope_hint: In function ‘xwl_pointer_warp_emulator_lock’ # 3195| { # 3196| struct xwl_seat *xwl_seat = warp_emulator->xwl_seat; # 3197|-> struct xwl_screen *xwl_screen = xwl_seat->xwl_screen; # 3198| struct zwp_pointer_constraints_v1 *pointer_constraints = # 3199| xwl_screen->pointer_constraints; Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-input.c: scope_hint: In function ‘xwl_seat_create_pointer_warp_emulator’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-input.c:3323:1: warning[-Wanalyzer-malloc-leak]: leak of ‘*xwl_seat.pointer_warp_emulator’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-input.c: scope_hint: In function ‘xwl_seat_create_pointer_warp_emulator’ # 3321| xwl_seat->pointer_warp_emulator = # 3322| xwl_pointer_warp_emulator_create(xwl_seat); # 3323|-> } # 3324| # 3325| static Bool Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-output.c:407:13: warning[core.NullDereference]: Array access (via field 'modes') results in a null pointer dereference # 405| # 406| for (i = 0; i < output->numModes; i++) { # 407|-> if (output->modes[i]->mode.width == width && output->modes[i]->mode.height == height) # 408| return output->modes[i]; # 409| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-screen.c: scope_hint: In function ‘xwl_cursor_warped_to’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-screen.c:260:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xwl_seat’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-screen.c:33: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘xwl_cursor_warped_to’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-screen.c: scope_hint: In function ‘xwl_cursor_warped_to’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-screen.c: scope_hint: In function ‘xwl_cursor_warped_to’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-screen.c: scope_hint: In function ‘xwl_cursor_warped_to’ # 258| # 259| xwl_window = xwl_window_from_window(window); # 260|-> if (!xwl_window && xwl_seat->focus_window) { # 261| focus = xwl_seat->focus_window->window; # 262| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-screen.c: scope_hint: In function ‘registry_global.part.0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-screen.c:452:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘queued’ # 450| if (xwl_screen->screen->root == NULL) { # 451| struct xwl_queued_drm_lease_device *queued = malloc(sizeof(struct xwl_queued_drm_lease_device)); # 452|-> queued->id = id; # 453| xorg_list_append(&queued->link, &xwl_screen->queued_drm_lease_devices); # 454| } else { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-window-buffers.c:185:16: warning[unix.Malloc]: Use of memory after it is freed # 183| link_buffer); # 184| # 185|-> return oldest_available_buffer->time + BUFFER_TIMEOUT - time; # 186| } # 187| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-xtest.c: scope_hint: In function ‘setup_ei’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-xtest.c:360:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xwl_ei_client’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/inputstr.h:55: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-xtest.c:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h: scope_hint: In function ‘setup_ei’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-xtest.c: scope_hint: In function ‘setup_ei’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-xtest.c: scope_hint: In function ‘setup_ei’ # 358| # 359| xwl_ei_client = calloc(1, sizeof *xwl_ei_client); # 360|-> xwl_ei_client->cmdline = xstrdup(cmdname); # 361| if (!xwl_ei_client) { # 362| error_ei("OOM, cannot setup EI\n"); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/hw/xwayland/xwayland-xtest.c:790:21: warning[unix.Malloc]: Use of memory after it is freed # 788| struct xwl_abs_device *abs, *tmp; # 789| # 790|-> xorg_list_for_each_entry_safe(abs, tmp, # 791| &xwl_ei_client->abs_devices, link) { # 792| if (abs->device != ei_device) Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:40: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:24: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c: scope_hint: In function ‘ProcRRGetOutputInfo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:73:19: warning[-Wanalyzer-malloc-leak]: leak of ‘extra’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:466:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:466:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:467:5: note: in expansion of macro ‘VERIFY_RR_OUTPUT’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:467:5: note: in expansion of macro ‘VERIFY_RR_OUTPUT’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:472:16: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c: scope_hint: In function ‘ProcRRGetOutputInfo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:472:16: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c: scope_hint: In function ‘ProcRRGetOutputInfo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:466:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ # 71| do { \ # 72| if ((sizeof(req) >> 2) != client->req_len) \ # 73|-> return(BadLength); \ # 74| } while (0) # 75| Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h:151: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compint.h:52: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:48: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c: scope_hint: In function ‘PanoramiXCompositeNameWindowPixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:73:19: warning[-Wanalyzer-malloc-leak]: leak of ‘newPix’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:712:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:712:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:720:5: note: in expansion of macro ‘LEGAL_NEW_RESOURCE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:720:5: note: in expansion of macro ‘LEGAL_NEW_RESOURCE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiXsrv.h:9: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:592: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/panoramiX.h:74:25: note: in expansion of macro ‘FOR_NSCREENS_FORWARD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:729:5: note: in expansion of macro ‘FOR_NSCREENS’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:743:14: note: in expansion of macro ‘GetCompWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:743:14: note: in expansion of macro ‘GetCompWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c: scope_hint: In function ‘PanoramiXCompositeNameWindowPixmap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:743:14: note: in expansion of macro ‘GetCompWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/composite/compext.c:712:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ # 71| do { \ # 72| if ((sizeof(req) >> 2) != client->req_len) \ # 73|-> return(BadLength); \ # 74| } while (0) # 75| Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h:151: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/pixmapstr.h:52: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:51: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:37: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c: scope_hint: In function ‘ProcShapeGetRectangles’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:73:19: warning[-Wanalyzer-malloc-leak]: leak of ‘rects’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:951:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:1194:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:35: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:1195:5: note: in expansion of macro ‘swapl’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:951:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:197:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:963:18: note: in expansion of macro ‘wInputShape’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:197:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:963:18: note: in expansion of macro ‘wInputShape’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c: scope_hint: In function ‘ProcShapeGetRectangles’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:1000:17: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/shape.c:951:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ # 71| do { \ # 72| if ((sizeof(req) >> 2) != client->req_len) \ # 73|-> return(BadLength); \ # 74| } while (0) # 75| Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/list.h:135:16: warning[-Wanalyzer-malloc-leak]: leak of ‘AllocBarrierDevice()’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c: scope_hint: In function ‘CreatePointerBarrierClient’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c:569:10: note: in expansion of macro ‘GetBarrierScreen’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c: scope_hint: In function ‘CreatePointerBarrierClient’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/xibarriers.c:569:10: note: in expansion of macro ‘GetBarrierScreen’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/list.h:387:30: note: in definition of macro ‘nt_list_for_each_entry’ # 133| entry->next = next; # 134| entry->prev = prev; # 135|-> prev->next = entry; # 136| } # 137| Error: GCC_ANALYZER_WARNING (CWE-835): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/input.h:58: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:16: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c: scope_hint: In function ‘DestroyFragments’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/list.h:325:10: warning[-Wanalyzer-infinite-loop]: infinite loop xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:137:5: note: in expansion of macro ‘xorg_list_for_each_entry_safe’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:137:5: note: in expansion of macro ‘xorg_list_for_each_entry_safe’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:137:5: note: in expansion of macro ‘xorg_list_for_each_entry_safe’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c: scope_hint: In function ‘DestroyFragments’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:137:5: note: in expansion of macro ‘xorg_list_for_each_entry_safe’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xext/xres.c:137:5: note: in expansion of macro ‘xorg_list_for_each_entry_safe’ # 323| pos = __container_of((head)->next, pos, member), \ # 324| tmp = __container_of(pos->member.next, pos, member); \ # 325|-> &pos->member != (head); \ # 326| pos = tmp, tmp = __container_of(pos->member.next, tmp, member)) # 327| Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/input.h:58: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/inputstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gestures.c:30: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gestures.c: scope_hint: In function ‘GestureAddRegularListener’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/list.h:387:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gestures.c:235:9: note: in expansion of macro ‘nt_list_for_each_entry’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gestures.c:39: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:190:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gestures.c:232:18: note: in expansion of macro ‘wOtherInputMasks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:190:33: note: in expansion of macro ‘wUseDefault’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gestures.c:232:18: note: in expansion of macro ‘wOtherInputMasks’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gestures.c:235:9: note: in expansion of macro ‘nt_list_for_each_entry’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/dix/gestures.c:235:9: note: in expansion of macro ‘nt_list_for_each_entry’ # 385| */ # 386| #define nt_list_for_each_entry(_entry, _list, _member) \ # 387|-> for (_entry = _list; _entry; _entry = (_entry)->_member) # 388| # 389| /** Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/glyph.c:31: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/glyph.c: scope_hint: In function ‘ResizeGlyphHash’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:107:14: warning[-Wanalyzer-malloc-leak]: leak of ‘newHash.table’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/glyph.c:412:16: note: in expansion of macro ‘TRUE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/glyph.c: scope_hint: In function ‘ResizeGlyphHash’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/glyph.c:412:16: note: in expansion of macro ‘TRUE’ # 105| # 106| #ifndef TRUE # 107|-> #define TRUE 1 # 108| #define FALSE 0 # 109| #endif Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/screenint.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_priv.h:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_compositerects.c:30: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_compositerects.c: scope_hint: In function ‘_pixman_region_init_clipped_rectangles’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:108:15: warning[-Wanalyzer-malloc-leak]: leak of ‘boxes’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_compositerects.c:62:20: note: in expansion of macro ‘FALSE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_compositerects.c:60:17: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_compositerects.c:60:17: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/glamor/glamor_compositerects.c:62:20: note: in expansion of macro ‘FALSE’ # 106| #ifndef TRUE # 107| #define TRUE 1 # 108|-> #define FALSE 0 # 109| #endif # 110| Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/input.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/inputstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getfctl.c:57: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getfctl.c: scope_hint: In function ‘CopySwapKbdFeedback’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:361:24: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*k2.led_values’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getfctl.c:108:9: note: in expansion of macro ‘swapl’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/inputstr.h:55: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getfctl.c:292:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getfctl.c:104:9: note: in expansion of macro ‘swaps’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/Xi/getfctl.c:108:9: note: in expansion of macro ‘swapl’ # 359| if (sizeof(*(x)) != 4) \ # 360| wrong_size(); \ # 361|-> *(x) = bswap_32(*(x)); \ # 362| } while (0) # 363| Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:64: warning[-Wanalyzer-malloc-leak]: leak of ‘rmlvo_dflts.layout’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:529:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:530:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:531:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ # 439| # 440| #define BUG_RETURN_VAL(cond, val) \ # 441|-> do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0) # 442| # 443| #define BUG_RETURN_VAL_MSG(cond, val, ...) \ Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:64: warning[-Wanalyzer-malloc-leak]: leak of ‘rmlvo_dflts.model’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:529:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:530:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:531:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ # 439| # 440| #define BUG_RETURN_VAL(cond, val) \ # 441|-> do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0) # 442| # 443| #define BUG_RETURN_VAL_MSG(cond, val, ...) \ Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:64: warning[-Wanalyzer-malloc-leak]: leak of ‘rmlvo_dflts.options’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:529:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:530:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:531:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ # 439| # 440| #define BUG_RETURN_VAL(cond, val) \ # 441|-> do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0) # 442| # 443| #define BUG_RETURN_VAL_MSG(cond, val, ...) \ Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:64: warning[-Wanalyzer-malloc-leak]: leak of ‘rmlvo_dflts.rules’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:529:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:530:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:531:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ # 439| # 440| #define BUG_RETURN_VAL(cond, val) \ # 441|-> do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0) # 442| # 443| #define BUG_RETURN_VAL_MSG(cond, val, ...) \ Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:42: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c: scope_hint: In function ‘InitKeyboardDeviceStructInternal’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:64: warning[-Wanalyzer-malloc-leak]: leak of ‘rmlvo_dflts.variant’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:529:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:530:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:441:18: note: in definition of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:531:5: note: in expansion of macro ‘BUG_RETURN_VAL’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:528:5: note: in expansion of macro ‘BUG_RETURN_VAL’ # 439| # 440| #define BUG_RETURN_VAL(cond, val) \ # 441|-> do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0) # 442| # 443| #define BUG_RETURN_VAL_MSG(cond, val, ...) \ Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrpointer.c:23: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:40: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/privates.h:123:21: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'privates') # 121| { # 122| assert(key->initialized); # 123|-> return (char *) (*privates) + key->offset; # 124| } # 125| Error: GCC_ANALYZER_WARNING (CWE-126): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:74:18: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘fbOverlayCopyWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c:32: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c:193:36: note: in expansion of macro ‘fbOverlayGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘fbOverlayCopyWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c:193:36: note: in expansion of macro ‘fbOverlayGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘fbOverlayCopyWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘fbOverlayCopyWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:74:18: note: read of 8 bytes from after the end of ‘layerRgn’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:74:18: note: valid subscripts for ‘layerRgn’ are ‘[0]’ to ‘[1]’ # └───────────────────────────────────────────────────┘ # ^ # 72| RegionNil(RegionPtr reg) # 73| { # 74|-> return ((reg)->data && !(reg)->data->numRects); # 75| } # 76| Error: GCC_ANALYZER_WARNING (CWE-126): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:165:16: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c:193:36: note: in expansion of macro ‘fbOverlayGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c:193:36: note: in expansion of macro ‘fbOverlayGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:165:16: note: read of 8 bytes from after the end of ‘layerRgn’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:165:16: note: valid subscripts for ‘layerRgn’ are ‘[0]’ to ‘[1]’ # └───────────────────────────────────────────────────┘ # ^ # 163| RegionUninit(RegionPtr _pReg) # 164| { # 165|-> if ((_pReg)->data && (_pReg)->data->size) { # 166| free((_pReg)->data); # 167| (_pReg)->data = NULL; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c:83: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:165:26: warning[unix.Malloc]: Use of memory after it is freed # 163| RegionUninit(RegionPtr _pReg) # 164| { # 165|-> if ((_pReg)->data && (_pReg)->data->size) { # 166| free((_pReg)->data); # 167| (_pReg)->data = NULL; Error: GCC_ANALYZER_WARNING (CWE-590): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:51: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:30: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:166:9: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘&RegionEmptyData’ which points to memory not on the heap xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:42: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damagestr.h:102:32: note: in expansion of macro ‘damageGetGCPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:363:5: note: in expansion of macro ‘damageGCPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:1417:5: note: in expansion of macro ‘DAMAGE_GC_OP_PROLOGUE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damagestr.h:102:32: note: in expansion of macro ‘damageGetGCPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:363:5: note: in expansion of macro ‘damageGCPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:1417:5: note: in expansion of macro ‘DAMAGE_GC_OP_PROLOGUE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damagestr.h:87:36: note: in expansion of macro ‘damageGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:137:5: note: in expansion of macro ‘damageScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damagestr.h:87:36: note: in expansion of macro ‘damageGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:137:5: note: in expansion of macro ‘damageScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:116:27: note: in expansion of macro ‘getDrawableDamage’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:138:5: note: in expansion of macro ‘drawableDamage’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:109:12: note: in expansion of macro ‘getPixmapDamageRef’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:109:12: note: in expansion of macro ‘getPixmapDamageRef’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:116:27: note: in expansion of macro ‘getDrawableDamage’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c:138:5: note: in expansion of macro ‘drawableDamage’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/miext/damage/damage.c: scope_hint: In function ‘RegionUninit’ # 164| { # 165| if ((_pReg)->data && (_pReg)->data->size) { # 166|-> free((_pReg)->data); # 167| (_pReg)->data = NULL; # 168| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/micopy.c:27: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mi.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/region.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:166:9: warning[unix.Malloc]: Argument to free() is the address of the global variable 'RegionEmptyData', which is not memory allocated by malloc() # 164| { # 165| if ((_pReg)->data && (_pReg)->data->size) { # 166|-> free((_pReg)->data); # 167| (_pReg)->data = NULL; # 168| } Error: GCC_ANALYZER_WARNING (CWE-121): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:167:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c:193:36: note: in expansion of macro ‘fbOverlayGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c:193:36: note: in expansion of macro ‘fbOverlayGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/fb/fboverlay.c: scope_hint: In function ‘RegionUninit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:167:23: note: write of 8 bytes to beyond the end of ‘layerRgn’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/regionstr.h:167:23: note: valid subscripts for ‘layerRgn’ are ‘[0]’ to ‘[1]’ # 165| if ((_pReg)->data && (_pReg)->data->size) { # 166| free((_pReg)->data); # 167|-> (_pReg)->data = NULL; # 168| } # 169| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:395:5: warning[deadcode.DeadStores]: Value stored to 'y' is never read # 393| doinner = -lw; # 394| slw = parc->width - doinner; # 395|-> y = parc->height >> 1; # 396| dy = parc->height & 1; # 397| dx = 1 - dy; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:814:25: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value # 812| } # 813| for (n = spdata->count1; --n >= 0;) { # 814|-> pts[0].x = xorg + span->lx; # 815| pts[0].y = yorgu; # 816| wids[0] = span->lw; Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c: scope_hint: In function ‘miFillWideEllipse’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:814:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*span.lx’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:63: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:402:9: note: in expansion of macro ‘MIWIDEARCSETUP’ # 812| } # 813| for (n = spdata->count1; --n >= 0;) { # 814|-> pts[0].x = xorg + span->lx; # 815| pts[0].y = yorgu; # 816| wids[0] = span->lw; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:834:25: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value # 832| } # 833| for (n = spdata->count2; --n >= 0;) { # 834|-> pts[0].x = xorg + span->lx; # 835| pts[0].y = yorgu; # 836| wids[0] = span->lw; Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:834:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*span.lx’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ # 832| } # 833| for (n = spdata->count2; --n >= 0;) { # 834|-> pts[0].x = xorg + span->lx; # 835| pts[0].y = yorgu; # 836| wids[0] = span->lw; Error: GCC_ANALYZER_WARNING (CWE-457): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:853:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*span.rw’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:398:5: note: in expansion of macro ‘MIWIDEARCSETUP’ # 851| } # 852| if (spdata->bot) { # 853|-> if (span->rw <= 0) { # 854| pts[0].x = xorg + span->lx; # 855| pts[0].y = yorgu; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:868:13: warning[deadcode.DeadStores]: Value stored to 'wids' is never read # 866| wids[1] = span->rw; # 867| pts += 2; # 868|-> wids += 2; # 869| } # 870| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:1130:17: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1128| # 1129| ptMin = pts; # 1130|-> ymin = ymax = (pts++)->y; # 1131| # 1132| while (--n > 0) { Error: GCC_ANALYZER_WARNING (CWE-787): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c: scope_hint: In function ‘miComputeArcs’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:2157:36: warning[-Wanalyzer-out-of-bounds]: buffer over-read xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:56: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:1901:12: note: in expansion of macro ‘xallocarray’ # 2155| arc->join = arcs[iphase].njoins; # 2156| arc->cap = arcs[iphase].ncaps; # 2157|-> arc->selfJoin = data[i].selfJoin; # 2158| prevphase = iphase; # 2159| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:2518:5: warning[deadcode.DeadStores]: Value stored to 'x0' is never read # 2516| } # 2517| # 2518|-> x0 = xmin; # 2519| x1 = xmax; # 2520| y0 = ymin; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:2519:5: warning[deadcode.DeadStores]: Value stored to 'x1' is never read # 2517| # 2518| x0 = xmin; # 2519|-> x1 = xmax; # 2520| y0 = ymin; # 2521| y1 = ymax; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:2520:5: warning[deadcode.DeadStores]: Value stored to 'y0' is never read # 2518| x0 = xmin; # 2519| x1 = xmax; # 2520|-> y0 = ymin; # 2521| y1 = ymax; # 2522| if (ymin != y1) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miarc.c:3431:23: warning[core.BitwiseShift]: Right operand is negative in left shift # 3429| mask = sweep[j].mask; # 3430| passRight = passLeft = 0; # 3431|-> if (mask & (1 << rightq)) { # 3432| if (sweep[j].a0 == righta) # 3433| passRight = right; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mibitblt.c:139:16: warning[deadcode.DeadStores]: Although the value stored to 'ppt' is used in the enclosing expression, the value is never actually read from 'ppt' # 137| } # 138| # 139|-> pptFirst = ppt = xallocarray(heightSrc, sizeof(DDXPointRec)); # 140| pwidthFirst = pwidth = xallocarray(heightSrc, sizeof(unsigned int)); # 141| numRects = RegionNumRects(prgnSrcClip); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mibitblt.c:140:19: warning[deadcode.DeadStores]: Although the value stored to 'pwidth' is used in the enclosing expression, the value is never actually read from 'pwidth' # 138| # 139| pptFirst = ppt = xallocarray(heightSrc, sizeof(DDXPointRec)); # 140|-> pwidthFirst = pwidth = xallocarray(heightSrc, sizeof(unsigned int)); # 141| numRects = RegionNumRects(prgnSrcClip); # 142| boxes = RegionRects(prgnSrcClip); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mibitblt.c:671:1: warning[unix.Malloc]: Potential memory leak # 669| (MiBits *) pDst); # 670| } # 671|-> } # 672| # 673| /* MIPUTIMAGE -- public entry for the PutImage request Error: GCC_ANALYZER_WARNING (CWE-787): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/micmap.c: scope_hint: In function ‘miInitVisuals’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/micmap.c:480:16: warning[-Wanalyzer-out-of-bounds]: buffer overflow xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/micmap.c:281:24: note: in expansion of macro ‘_RZ’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/micmap.c:331:19: note: in expansion of macro ‘_RM’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/screenint.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/scrnintstr.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/micmap.c:36: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/micmap.c:461:13: note: in expansion of macro ‘xallocarray’ # 478| vtype = visuals->visuals; # 479| nvtype = visuals->count; # 480|-> *prefp = visuals->preferredCVC; # 481| prefp++; # 482| vid = NULL; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/micmap.c:503:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘vid’ # 501| visual->ColormapEntries = 1 << d; # 502| visual->nplanes = d; # 503|-> visual->vid = *vid = FakeClientID(0); # 504| switch (visual->class) { # 505| case PseudoColor: Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/micmap.c:503:32: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'vid') # 501| visual->ColormapEntries = 1 << d; # 502| visual->nplanes = d; # 503|-> visual->vid = *vid = FakeClientID(0); # 504| switch (visual->class) { # 505| case PseudoColor: Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/midash.c:78:21: warning[core.DivideZero]: Division by zero # 76| totallen += pDash[i]; # 77| if (totallen <= dist) # 78|-> dist = dist % totallen; # 79| while (dist >= pDash[dashIndex]) { # 80| dist -= pDash[dashIndex]; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mieq.c:503:9: warning[core.NullDereference]: Dereference of null pointer # 501| else { # 502| /* process slave first, then master */ # 503|-> dev->public.processInputProc(event, dev); # 504| # 505| /* Check for the SD's master in case the device got detached Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c: scope_hint: In function ‘miPaintWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c:553:47: warning[-Wanalyzer-malloc-leak]: leak of ‘prect’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c:82: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c:538:13: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c: scope_hint: In function ‘miPaintWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c: scope_hint: In function ‘miPaintWindow’ # 551| numRects = RegionNumRects(prgn); # 552| pbox = RegionRects(prgn); # 553|-> for (i = numRects; --i >= 0; pbox++, prect++) { # 554| prect->x = pbox->x1 - draw_x_off; # 555| prect->y = pbox->y1 - draw_y_off; Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c:563:5: warning[-Wanalyzer-malloc-leak]: leak of ‘prect’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c:538:13: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c: scope_hint: In function ‘miPaintWindow’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miexpose.c: scope_hint: In function ‘miPaintWindow’ # 561| free(prect); # 562| # 563|-> FreeScratchGC(pGC); # 564| } # 565| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mifillarc.c:566:9: warning[deadcode.DeadStores]: Value stored to 'slw' is never read # 564| slw = arc->height; # 565| if (slice.flip_top || slice.flip_bot) # 566|-> slw += (arc->height >> 1) + 1; # 567| if (pGC->miTranslate) { # 568| xorg += pDraw->x; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mifillarc.c:610:9: warning[deadcode.DeadStores]: Value stored to 'slw' is never read # 608| slw = arc->height; # 609| if (slice.flip_top || slice.flip_bot) # 610|-> slw += (arc->height >> 1) + 1; # 611| if (pGC->miTranslate) { # 612| xorg += pDraw->x; Error: GCC_ANALYZER_WARNING (CWE-416): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miinitext.c: scope_hint: In function ‘InitExtensions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miinitext.c:267:16: warning[-Wanalyzer-use-after-free]: use after ‘reallocarray’ of ‘ext’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miinitext.c: scope_hint: In function ‘InitExtensions’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miinitext.c: scope_hint: In function ‘InitExtensions’ # 265| for (i = 0; i < numExtensionModules; i++) { # 266| ext = &ExtensionModuleList[i]; # 267|-> if (ext->initFunc != NULL && # 268| (ext->disablePtr == NULL || !*ext->disablePtr)) { # 269| LogMessageVerb(X_INFO, 3, "Initializing extension %s\n", Error: GCC_ANALYZER_WARNING (CWE-415): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miinitext.c: scope_hint: In function ‘NewExtensionModuleList’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miinitext.c:288:27: warning[-Wanalyzer-double-free]: double-‘reallocarray’ of ‘save’ # 286| # 287| n = numExtensionModules + size; # 288|-> ExtensionModuleList = reallocarray(ExtensionModuleList, n, # 289| sizeof(ExtensionModule)); # 290| if (ExtensionModuleList == NULL) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mioverlay.c:1733:10: warning[core.NullDereference]: Access to field 'firstChild' results in a dereference of a null pointer (loaded from variable 'parent') # 1731| prevSib->nextSib = pTree; # 1732| # 1733|-> if (!parent->firstChild) # 1734| parent->firstChild = parent->lastChild = pTree; # 1735| else if (parent->lastChild == prevSib) Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:629:32: warning[core.NullDereference]: Dereference of null pointer # 627| ptsOut->x = pAET->bres.minor; # 628| ptsOut++->y = y; # 629|-> *width++ = pAET->nextWETE->bres.minor - pAET->bres.minor; # 630| nPts++; # 631| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:645:45: warning[core.NullDereference]: Access to field 'ymax' results in a dereference of a null pointer (loaded from variable 'pAET') # 643| pWETE = pWETE->nextWETE; # 644| while (pWETE != pAET) # 645|-> EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET); # 646| pWETE = pWETE->nextWETE; # 647| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:646:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pWETE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:137:28: note: in definition of macro ‘max’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:645:25: note: in expansion of macro ‘EVALUATEEDGEWINDING’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:645:25: note: in expansion of macro ‘EVALUATEEDGEWINDING’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:645:25: note: in expansion of macro ‘EVALUATEEDGEWINDING’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:645:25: note: in expansion of macro ‘EVALUATEEDGEWINDING’ # 644| while (pWETE != pAET) # 645| EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET); # 646|-> pWETE = pWETE->nextWETE; # 647| } # 648| EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:61: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c: scope_hint: In function ‘miFillGeneralPoly’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.h:162:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pAET’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:593:17: note: in expansion of macro ‘EVALUATEEDGEEVENODD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/window.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/windowstr.h:50: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:56: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:137:28: note: in definition of macro ‘max’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:592:17: note: in expansion of macro ‘EVALUATEEDGEEVENODD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:592:17: note: in expansion of macro ‘EVALUATEEDGEEVENODD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:592:17: note: in expansion of macro ‘EVALUATEEDGEEVENODD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:592:17: note: in expansion of macro ‘EVALUATEEDGEEVENODD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:593:17: note: in expansion of macro ‘EVALUATEEDGEEVENODD’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/mipoly.c:593:17: note: in expansion of macro ‘EVALUATEEDGEEVENODD’ # 160| */ # 161| #define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) { \ # 162|-> if (pAET->ymax == y) { /* leaving this edge */ \ # 163| pPrevAET->next = pAET->next; \ # 164| pAET = pPrevAET->next; \ Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/mi/miwideline.c:1411:8: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1409| Bool left; # 1410| # 1411|-> dx = -face->dy; # 1412| dy = face->dx; # 1413| xa = face->xa; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/access.c:941:11: warning[deadcode.DeadStores]: Value stored to 'hostname' during its initialization is never read # 939| register HOST *host; # 940| char lhostname[120], ohostname[120]; # 941|-> char *hostname = ohostname; # 942| char fname[PATH_MAX + 1]; # 943| int fnamelen; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/access.c:1088:13: warning[deadcode.DeadStores]: Value stored to 'family' is never read # 1086| } # 1087| #endif /* TCPCONN || STREAMSCONN */ # 1088|-> family = FamilyWild; # 1089| } # 1090| fclose(fd); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/access.c:1446:32: warning[core.NullDereference]: Access to field 'errorValue' results in a dereference of a null pointer (loaded from variable 'client') # 1444| case FamilyServerInterpreted: # 1445| if ((len = CheckAddr(family, pAddr, length)) < 0) { # 1446|-> client->errorValue = length; # 1447| return BadValue; # 1448| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/access.c:1452:28: warning[core.NullDereference]: Access to field 'errorValue' results in a dereference of a null pointer (loaded from variable 'client') # 1450| case FamilyLocal: # 1451| default: # 1452|-> client->errorValue = family; # 1453| return BadValue; # 1454| } Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/io.c: scope_hint: In function ‘FlushClient’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/io.c:838:16: warning[-Wanalyzer-malloc-leak]: leak of ‘obuf’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/io.c: scope_hint: In function ‘FlushClient’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/io.c:869:16: note: in definition of macro ‘InsertIOV’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/io.c:76: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/osdep.h:70:23: note: in definition of macro ‘ETEST’ # 836| # 837| if (!oco) # 838|-> return 0; # 839| written = 0; # 840| padsize = padding_for_int32(extraCount); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/log.c:837:29: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value due to array index out of bounds # 835| buf[len - 1] = '\n'; # 836| # 837|-> newline = (buf[len - 1] == '\n'); # 838| LogSWrite(verb, buf, len, newline); # 839| } Error: GCC_ANALYZER_WARNING (CWE-775): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/osinit.c: scope_hint: In function ‘OsInit’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/osinit.c:325:1: warning[-Wanalyzer-file-leak]: leak of FILE ‘err’ # 323| LogInit(NULL, NULL); # 324| SmartScheduleInit(); # 325|-> } # 326| # 327| void Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/osinit.c:325:1: warning[-Wanalyzer-malloc-leak]: leak of ‘err’ # 323| LogInit(NULL, NULL); # 324| SmartScheduleInit(); # 325|-> } # 326| # 327| void Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/ospoll.c: scope_hint: In function ‘ospoll_create’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/ospoll.c:228:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ospoll’ # 226| struct ospoll *ospoll = calloc(1, sizeof (struct ospoll)); # 227| # 228|-> ospoll->epoll_fd = epoll_create1(EPOLL_CLOEXEC); # 229| if (ospoll->epoll_fd < 0) { # 230| free (ospoll); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/ospoll.c:421:9: warning[deadcode.DeadStores]: Value stored to 'pos' during its initialization is never read # 419| ospoll_remove(struct ospoll *ospoll, int fd) # 420| { # 421|-> int pos = ospoll_find(ospoll, fd); # 422| # 423| pos = ospoll_find(ospoll, fd); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/utils.c: scope_hint: In function ‘set_font_authorizations’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/utils.c:1116:14: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’ # 1114| # 1115| p = result; # 1116|-> *p++ = sizeof(AUTHORIZATION_NAME) >> 8; # 1117| *p++ = sizeof(AUTHORIZATION_NAME) & 0xff; # 1118| *p++ = (len) >> 8; Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/utils.c: scope_hint: In function ‘Fopen’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/utils.c:1604:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(file, type)’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/utils.c:69: included_from: Included from here. /usr/include/stdio.h:184:12: note: argument 1 of ‘fclose’ must be non-null # 1602| # 1603| if (seteuid(euid) == -1) { # 1604|-> fclose(iop); # 1605| return NULL; # 1606| } Error: GCC_ANALYZER_WARNING (CWE-762): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/utils.c: scope_hint: In function ‘xstrtokenize’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/utils.c:2071:17: warning[-Wanalyzer-mismatching-deallocation]: ‘list’ should have been deallocated with ‘free’ but was deallocated with ‘reallocarray’ # 2069| goto error; # 2070| for (tok = strtok(tmp, separators); tok; tok = strtok(NULL, separators)) { # 2071|-> nlist = reallocarray(list, num + 2, sizeof(*list)); # 2072| if (!nlist) # 2073| goto error; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/xdmcp.c: scope_hint: In function ‘get_mcast_options’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/xdmcp.c:1511:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mcastinfo’ # 1509| # 1510| mcastinfo = malloc(sizeof(struct multicastinfo)); # 1511|-> mcastinfo->next = NULL; # 1512| mcastinfo->ai = firstai; # 1513| mcastinfo->hops = hopcount; Error: COMPILER_WARNING (CWE-477): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/xsha1.c: scope_hint: In function ‘x_sha1_init’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/xsha1.c:270:5: warning[-Wdeprecated-declarations]: ‘SHA1_Init’ is deprecated: Since OpenSSL 3.0 # 270 | ret = SHA1_Init(ctx); # | ^~~ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/xsha1.c:260: included_from: Included from here. /usr/include/openssl/sha.h:49:27: note: declared here # 49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c); # | ^~~~~~~~~ # 268| if (!ctx) # 269| return NULL; # 270|-> ret = SHA1_Init(ctx); # 271| if (!ret) { # 272| free(ctx); Error: COMPILER_WARNING (CWE-477): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/xsha1.c: scope_hint: In function ‘x_sha1_update’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/xsha1.c:284:5: warning[-Wdeprecated-declarations]: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 # 284 | ret = SHA1_Update(sha_ctx, data, size); # | ^~~ /usr/include/openssl/sha.h:50:27: note: declared here # 50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len); # | ^~~~~~~~~~~ # 282| SHA_CTX *sha_ctx = ctx; # 283| # 284|-> ret = SHA1_Update(sha_ctx, data, size); # 285| if (!ret) # 286| free(sha_ctx); Error: COMPILER_WARNING (CWE-477): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/xsha1.c: scope_hint: In function ‘x_sha1_final’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/os/xsha1.c:296:5: warning[-Wdeprecated-declarations]: ‘SHA1_Final’ is deprecated: Since OpenSSL 3.0 # 296 | ret = SHA1_Final(result, sha_ctx); # | ^~~ /usr/include/openssl/sha.h:51:27: note: declared here # 51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c); # | ^~~~~~~~~~ # 294| SHA_CTX *sha_ctx = ctx; # 295| # 296|-> ret = SHA1_Final(result, sha_ctx); # 297| free(sha_ctx); # 298| return ret; Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/present/present_notify.c: scope_hint: In function ‘present_create_notifies’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/present/present_notify.c:83:19: warning[-Wanalyzer-malloc-leak]: leak of ‘notifies’ # 81| return BadAlloc; # 82| # 83|-> for (i = 0; i < num_notifies; i++) { # 84| status = dixLookupWindow(¬ifies[i].window, x_notifies[i].window, client, DixGetAttrAccess); # 85| if (status != Success) Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/present/present_notify.c:95:12: warning[unix.Malloc]: Potential leak of memory pointed to by 'notifies' # 93| added = i; # 94| } # 95|-> return Success; # 96| # 97| bail: Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randr.c:587:9: warning[deadcode.DeadStores]: Value stored to 'primary' is never read # 585| } # 586| else { # 587|-> primary = pScreen; # 588| primarysp = pScrPriv; # 589| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:195:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 193| * Copy the new list of outputs into the crtc # 194| */ # 195|-> memcpy(crtc->outputs, outputs, numOutputs * sizeof(RROutputPtr)); # 196| /* # 197| * Update remaining crtc fields Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:195:5: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 193| * Copy the new list of outputs into the crtc # 194| */ # 195|-> memcpy(crtc->outputs, outputs, numOutputs * sizeof(RROutputPtr)); # 196| /* # 197| * Update remaining crtc fields Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c: scope_hint: In function ‘RRCrtcSet’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:750:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘outputs’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:40: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:24: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1307:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1310:5: note: in expansion of macro ‘VERIFY_RR_CRTC’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1387:16: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c: scope_hint: In function ‘RRCrtcSet’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1387:16: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:438:52: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:746:5: note: in expansion of macro ‘rrScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c: scope_hint: In function ‘RRCrtcSet’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:438:52: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:746:5: note: in expansion of macro ‘rrScrPriv’ # 748| crtcChanged = FALSE; # 749| for (o = 0; o < numOutputs; o++) { # 750|-> if (outputs[o]) { # 751| if (rrCheckEmulated(outputs[o]) || (outputs[o]->crtc != crtc)) { # 752| crtcChanged = TRUE; Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:764:10: warning[-Wanalyzer-null-argument]: use of NULL ‘outputs’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1307:5: note: in expansion of macro ‘REQUEST_AT_LEAST_SIZE’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1310:5: note: in expansion of macro ‘VERIFY_RR_CRTC’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1387:16: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c: scope_hint: In function ‘RRCrtcSet’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1387:16: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:438:52: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:746:5: note: in expansion of macro ‘rrScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c: scope_hint: In function ‘RRCrtcSet’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:438:52: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:746:5: note: in expansion of macro ‘rrScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/os.h:56: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:38: included_from: Included from here. /usr/include/string.h:64:12: note: argument 2 of ‘memcmp’ must be non-null # 762| crtc->rotation == rotation && # 763| crtc->numOutputs == numOutputs && # 764|-> !memcmp(crtc->outputs, outputs, numOutputs * sizeof(RROutputPtr)) && # 765| !RRCrtcPendingProperties(crtc) && !RRCrtcPendingTransform(crtc) && # 766| !crtcChanged) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:764:10: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 762| crtc->rotation == rotation && # 763| crtc->numOutputs == numOutputs && # 764|-> !memcmp(crtc->outputs, outputs, numOutputs * sizeof(RROutputPtr)) && # 765| !RRCrtcPendingProperties(crtc) && !RRCrtcPendingTransform(crtc) && # 766| !crtcChanged) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1246:24: warning[core.NullDereference]: Array access (from variable 'outputs') results in a null pointer dereference # 1244| # 1245| for (i = 0; i < crtc->numOutputs; i++) { # 1246|-> outputs[i] = crtc->outputs[i]->id; # 1247| if (client->swapped) # 1248| swapl(&outputs[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1255:37: warning[core.NullDereference]: Array access (from variable 'possible') results in a null pointer dereference # 1253| for (j = 0; j < pScrPriv->outputs[i]->numCrtcs; j++) # 1254| if (pScrPriv->outputs[i]->crtcs[j] == crtc) { # 1255|-> possible[k] = pScrPriv->outputs[i]->id; # 1256| if (client->swapped) # 1257| swapl(&possible[k]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1392:9: warning[deadcode.DeadStores]: Value stored to 'time' is never read # 1390| # 1391| if (!pScrPriv) { # 1392|-> time = currentTime; # 1393| status = RRSetConfigFailed; # 1394| goto sendReply; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1600:9: warning[deadcode.DeadStores]: Value stored to 'time' is never read # 1598| # 1599| if (!pScrPriv) { # 1600|-> time = currentTime; # 1601| status = RRSetConfigFailed; # 1602| goto sendReply; Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1714:9: warning[-Wanalyzer-null-argument]: use of NULL ‘extra’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1686:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1687:5: note: in expansion of macro ‘VERIFY_RR_CRTC’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1687:5: note: in expansion of macro ‘VERIFY_RR_CRTC’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1712| WriteToClient(client, sizeof(xRRGetCrtcGammaReply), &reply); # 1713| if (crtc->gammaSize) { # 1714|-> memcpy(extra, crtc->gammaRed, len); # 1715| client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; # 1716| WriteSwappedDataToClient(client, len, extra); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrcrtc.c:1876:5: warning[deadcode.DeadStores]: Value stored to 'extra' is never read # 1874| # 1875| transform_encode(client, &reply->currentTransform, ¤t->transform); # 1876|-> extra += transform_filter_encode(client, extra, # 1877| &reply->currentNbytesFilter, # 1878| &reply->currentNparamsFilter, current); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrmonitor.c:170:19: warning[unix.Malloc]: Use of memory allocated with size zero # 168| RRMonitorSetFromClient(RRMonitorPtr client_monitor, RRMonitorPtr monitor) # 169| { # 170|-> monitor->name = client_monitor->name; # 171| monitor->pScreen = client_monitor->pScreen; # 172| monitor->numOutputs = client_monitor->numOutputs; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:153:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 151| newClones = NULL; # 152| free(output->clones); # 153|-> memcpy(newClones, clones, numClones * sizeof(RROutputPtr)); # 154| output->clones = newClones; # 155| output->numClones = numClones; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:190:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 188| free(output->modes); # 189| } # 190|-> memcpy(newModes, modes, numModes * sizeof(RRModePtr)); # 191| output->modes = newModes; # 192| output->numModes = numModes; Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c: scope_hint: In function ‘RROutputSetCrtcs’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:285:5: warning[-Wanalyzer-null-argument]: use of NULL ‘newCrtcs’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 283| newCrtcs = NULL; # 284| free(output->crtcs); # 285|-> memcpy(newCrtcs, crtcs, numCrtcs * sizeof(RRCrtcPtr)); # 286| output->crtcs = newCrtcs; # 287| output->numCrtcs = numCrtcs; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:285:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 283| newCrtcs = NULL; # 284| free(output->crtcs); # 285|-> memcpy(newCrtcs, crtcs, numCrtcs * sizeof(RRCrtcPtr)); # 286| output->crtcs = newCrtcs; # 287| output->numCrtcs = numCrtcs; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:540:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:466:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:467:5: note: in expansion of macro ‘VERIFY_RR_OUTPUT’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:467:5: note: in expansion of macro ‘VERIFY_RR_OUTPUT’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:472:16: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c: scope_hint: In function ‘ProcRRGetOutputInfo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:472:16: note: in expansion of macro ‘rrGetScrPriv’ # 538| # 539| for (i = 0; i < output->numCrtcs; i++) { # 540|-> crtcs[i] = output->crtcs[i]->id; # 541| if (client->swapped) # 542| swapl(&crtcs[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:540:22: warning[core.NullDereference]: Array access (from variable 'crtcs') results in a null pointer dereference # 538| # 539| for (i = 0; i < output->numCrtcs; i++) { # 540|-> crtcs[i] = output->crtcs[i]->id; # 541| if (client->swapped) # 542| swapl(&crtcs[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:546:26: warning[core.NullDereference]: Array access (from variable 'modes') results in a null pointer dereference # 544| for (i = 0; i < output->numModes + output->numUserModes; i++) { # 545| if (i < output->numModes) # 546|-> modes[i] = output->modes[i]->mode.id; # 547| else # 548| modes[i] = output->userModes[i - output->numModes]->mode.id; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:548:26: warning[core.NullDereference]: Array access (from variable 'modes') results in a null pointer dereference # 546| modes[i] = output->modes[i]->mode.id; # 547| else # 548|-> modes[i] = output->userModes[i - output->numModes]->mode.id; # 549| if (client->swapped) # 550| swapl(&modes[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:553:23: warning[core.NullDereference]: Array access (from variable 'clones') results in a null pointer dereference # 551| } # 552| for (i = 0; i < output->numClones; i++) { # 553|-> clones[i] = output->clones[i]->id; # 554| if (client->swapped) # 555| swapl(&clones[i]); Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:558:5: warning[-Wanalyzer-null-argument]: use of NULL ‘name’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:466:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:467:5: note: in expansion of macro ‘VERIFY_RR_OUTPUT’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:467:5: note: in expansion of macro ‘VERIFY_RR_OUTPUT’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:472:16: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c: scope_hint: In function ‘ProcRRGetOutputInfo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:472:16: note: in expansion of macro ‘rrGetScrPriv’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 556| } # 557| } # 558|-> memcpy(name, output->name, output->nameLength); # 559| if (client->swapped) { # 560| swaps(&rep.sequenceNumber); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rroutput.c:558:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 556| } # 557| } # 558|-> memcpy(name, output->name, output->nameLength); # 559| if (client->swapped) { # 560| swaps(&rep.sequenceNumber); Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproperty.c: scope_hint: In function ‘RRConfigureOutputProperty’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproperty.c:385:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘new_values’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:38: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproperty.c:23: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproperty.c:378:18: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 383| } # 384| if (num_values) # 385|-> memcpy(new_values, values, num_values * sizeof(INT32)); # 386| # 387| /* Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrprovider.c:113:9: warning[core.NullDereference]: Array access (from variable 'providers') results in a null pointer dereference # 111| # 112| providers = (RRProvider *)extra; # 113|-> ADD_PROVIDER(pScreen); # 114| xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { # 115| ADD_PROVIDER(iter); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrprovider.c:115:13: warning[core.NullDereference]: Array access (from variable 'providers') results in a null pointer dereference # 113| ADD_PROVIDER(pScreen); # 114| xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { # 115|-> ADD_PROVIDER(iter); # 116| } # 117| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrprovider.c:201:18: warning[core.NullDereference]: Array access (from variable 'crtcs') results in a null pointer dereference # 199| # 200| for (i = 0; i < pScrPriv->numCrtcs; i++) { # 201|-> crtcs[i] = pScrPriv->crtcs[i]->id; # 202| if (client->swapped) # 203| swapl(&crtcs[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrprovider.c:207:20: warning[core.NullDereference]: Array access (from variable 'outputs') results in a null pointer dereference # 205| # 206| for (i = 0; i < pScrPriv->numOutputs; i++) { # 207|-> outputs[i] = pScrPriv->outputs[i]->id; # 208| if (client->swapped) # 209| swapl(&outputs[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrprovider.c:214:22: warning[core.NullDereference]: Array access (from variable 'providers') results in a null pointer dereference # 212| i = 0; # 213| if (provider->offload_sink) { # 214|-> providers[i] = provider->offload_sink->id; # 215| if (client->swapped) # 216| swapl(&providers[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrprovider.c:223:22: warning[core.NullDereference]: Array access (from variable 'providers') results in a null pointer dereference # 221| } # 222| if (provider->output_source) { # 223|-> providers[i] = provider->output_source->id; # 224| if (client->swapped) # 225| swapl(&providers[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrprovider.c:234:22: warning[core.NullDereference]: Array access (from variable 'providers') results in a null pointer dereference # 232| continue; # 233| pScrProvPriv = rrGetScrPriv(provscreen); # 234|-> providers[i] = pScrProvPriv->provider->id; # 235| if (client->swapped) # 236| swapl(&providers[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrprovider.c:247:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 245| } # 246| # 247|-> memcpy(name, provider->name, rep.nameLength); # 248| if (client->swapped) { # 249| swaps(&rep.sequenceNumber); Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproviderproperty.c: scope_hint: In function ‘RRConfigureProviderProperty’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproviderproperty.c:360:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘new_values’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:38: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproviderproperty.c:23: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproviderproperty.c:353:18: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 358| } # 359| if (num_values) # 360|-> memcpy(new_values, values, num_values * sizeof(INT32)); # 361| # 362| /* Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproviderproperty.c: scope_hint: In function ‘ProcRRListProviderProperties’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproviderproperty.c:419:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘temppAtoms’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:40: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproviderproperty.c:396:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproviderproperty.c:398:5: note: in expansion of macro ‘VERIFY_RR_PROVIDER’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrproviderproperty.c:398:5: note: in expansion of macro ‘VERIFY_RR_PROVIDER’ # 417| temppAtoms = pAtoms; # 418| for (prop = provider->properties; prop; prop = prop->next) # 419|-> *temppAtoms++ = prop->propertyName; # 420| # 421| WriteToClient(client, sizeof(xRRListProviderPropertiesReply), (char *) &rep); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:449:18: warning[core.NullDereference]: Array access (from variable 'crtcs') results in a null pointer dereference # 447| has_primary = 1; # 448| primary_crtc = pScrPriv->primaryOutput->crtc; # 449|-> crtcs[0] = pScrPriv->primaryOutput->crtc->id; # 450| if (client->swapped) # 451| swapl(&crtcs[0]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:454:5: warning[core.NullDereference]: Array access (from variable 'crtcs') results in a null pointer dereference # 452| crtc_count = 1; # 453| } # 454|-> update_arrays(pScreen, pScrPriv, primary_crtc, has_primary); # 455| # 456| xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:454:5: warning[core.NullDereference]: Array access (from variable 'modeinfos') results in a null pointer dereference # 452| crtc_count = 1; # 453| } # 454|-> update_arrays(pScreen, pScrPriv, primary_crtc, has_primary); # 455| # 456| xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:454:5: warning[core.NullDereference]: Array access (from variable 'outputs') results in a null pointer dereference # 452| crtc_count = 1; # 453| } # 454|-> update_arrays(pScreen, pScrPriv, primary_crtc, has_primary); # 455| # 456| xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:462:9: warning[core.NullDereference]: Array access (from variable 'crtcs') results in a null pointer dereference # 460| pScrPriv = rrGetScrPriv(iter); # 461| # 462|-> update_arrays(iter, pScrPriv, primary_crtc, has_primary); # 463| } # 464| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:462:9: warning[core.NullDereference]: Array access (from variable 'modeinfos') results in a null pointer dereference # 460| pScrPriv = rrGetScrPriv(iter); # 461| # 462|-> update_arrays(iter, pScrPriv, primary_crtc, has_primary); # 463| } # 464| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:462:9: warning[core.NullDereference]: Array access (from variable 'outputs') results in a null pointer dereference # 460| pScrPriv = rrGetScrPriv(iter); # 461| # 462|-> update_arrays(iter, pScrPriv, primary_crtc, has_primary); # 463| } # 464| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:577:22: warning[core.NullDereference]: Array access (from variable 'crtcs') results in a null pointer dereference # 575| if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc) { # 576| has_primary = 1; # 577|-> crtcs[0] = pScrPriv->primaryOutput->crtc->id; # 578| if (client->swapped) # 579| swapl(&crtcs[0]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:588:36: warning[core.NullDereference]: Array access (from variable 'crtcs') results in a null pointer dereference # 586| continue; # 587| } # 588|-> crtcs[i + has_primary] = pScrPriv->crtcs[i]->id; # 589| if (client->swapped) # 590| swapl(&crtcs[i + has_primary]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:594:24: warning[core.NullDereference]: Array access (from variable 'outputs') results in a null pointer dereference # 592| # 593| for (i = 0; i < pScrPriv->numOutputs; i++) { # 594|-> outputs[i] = pScrPriv->outputs[i]->id; # 595| if (client->swapped) # 596| swapl(&outputs[i]); Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:602:26: warning[core.NullDereference]: Array access (from variable 'modeinfos') results in a null pointer dereference # 600| RRModePtr mode = modes[i]; # 601| # 602|-> modeinfos[i] = mode->mode; # 603| if (client->swapped) { # 604| swapl(&modeinfos[i].id); Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c: scope_hint: In function ‘ProcRRGetScreenInfo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:848:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘size’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dixstruct.h:28: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/randrstr.h:40: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:23: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:767:5: note: in expansion of macro ‘REQUEST_SIZE_MATCH’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:773:16: note: in expansion of macro ‘rrGetScrPriv’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/cursor.h:53: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/dix.h:54: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c: scope_hint: In function ‘ProcRRGetScreenInfo’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:773:16: note: in expansion of macro ‘rrGetScrPriv’ # 846| for (i = 0; i < pData->nsize; i++) { # 847| pSize = &pData->sizes[i]; # 848|-> size->widthInPixels = pSize->width; # 849| size->heightInPixels = pSize->height; # 850| size->widthInMillimeters = pSize->mmWidth; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:848:33: warning[core.NullDereference]: Access to field 'widthInPixels' results in a dereference of a null pointer (loaded from variable 'size') # 846| for (i = 0; i < pData->nsize; i++) { # 847| pSize = &pData->sizes[i]; # 848|-> size->widthInPixels = pSize->width; # 849| size->heightInPixels = pSize->height; # 850| size->widthInMillimeters = pSize->mmWidth; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:946:9: warning[deadcode.DeadStores]: Value stored to 'time' is never read # 944| # 945| if (!pScrPriv) { # 946|-> time = currentTime; # 947| status = RRSetConfigFailed; # 948| goto sendReply; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/randr/rrscreen.c:955:9: warning[deadcode.DeadStores]: Value stored to 'time' is never read # 953| output = RRFirstOutput(pScreen); # 954| if (!output) { # 955|-> time = currentTime; # 956| status = RRSetConfigFailed; # 957| goto sendReply; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/record/record.c:889:25: warning[core.NullDereference]: Access to field 'requestVector' results in a dereference of a null pointer (loaded from variable 'pClient') # 887| # 888| for (j = interval.first; j <= interval.last; j++) # 889|-> pClient->requestVector[j] = RecordARequest; # 890| } # 891| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/record/record.c:2214:43: warning[core.NullDereference]: Dereference of null pointer # 2212| if (pri->nRanges == 0) # 2213| RecordAllocRanges(pri, 1); # 2214|-> pri->pRanges[0].clientStarted = pRCAP->clientStarted; # 2215| pri->pRanges[0].clientDied = pRCAP->clientDied; # 2216| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/record/set.c: scope_hint: In function ‘IntervalListCreateSet’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/record/set.c:355:5: warning[-Wanalyzer-null-argument]: use of NULL ‘stackIntervals’ where non-null expected <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 353| prls->baseSet.ops = &IntervalListSetOperations; # 354| } # 355|-> memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval)); # 356| prls->nIntervals = nIntervals; # 357| bailout: Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/record/set.c:355:5: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 353| prls->baseSet.ops = &IntervalListSetOperations; # 354| } # 355|-> memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval)); # 356| prls->nIntervals = nIntervals; # 357| bailout: Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/filter.c: scope_hint: In function ‘SetPicturePictFilter’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/filter.c:348:36: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new_params’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/filter.c:27: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/filter.c:339:30: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/filter.c:339:30: note: in expansion of macro ‘xallocarray’ # 346| } # 347| for (i = 0; i < nparams; i++) # 348|-> pPicture->filter_params[i] = params[i]; # 349| pPicture->filter = pFilter->id; # 350| Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/glyph.c:130:21: warning[core.DivideZero]: Division by zero # 128| # 129| table = hash->table; # 130|-> elt = signature % tableSize; # 131| step = 0; # 132| del = 0; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/glyph.c: scope_hint: In function ‘AllocateGlyphHash’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/glyph.c:389:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hashSet’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/glyph.c: scope_hint: In function ‘AllocateGlyphHash’ # 387| AllocateGlyphHash(GlyphHashPtr hash, GlyphHashSetPtr hashSet) # 388| { # 389|-> hash->table = calloc(hashSet->size, sizeof(GlyphRefRec)); # 390| if (!hash->table) # 391| return FALSE; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/miindex.c:99:12: warning[deadcode.DeadStores]: Although the value stored to 'gray' is used in the enclosing expression, the value is never actually read from 'gray' # 97| * Compute size of cube and gray ramps # 98| */ # 99|-> cube = gray = 0; # 100| switch (policy) { # 101| case PictureCmapPolicyAll: Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/miindex.c:157:59: warning[core.DivideZero]: Division by zero # 155| for (g = 0; g < gray; g++) { # 156| pixel = 0; # 157|-> red = green = blue = (g * 65535 + (gray - 1) / 2) / (gray - 1); # 158| if (AllocColor(pColormap, &red, &green, &blue, &pixel, 0) != Success) # 159| return FALSE; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/picture.c:259:9: warning[deadcode.DeadStores]: Value stored to 'format' is never read # 257| pDepth = &pScreen->allowedDepths[d]; # 258| bpp = BitsPerPixel(pDepth->depth); # 259|-> format = 0; # 260| switch (bpp) { # 261| case 16: Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/picture.c:1011:24: warning[core.NullDereference]: Access to field 'myNum' results in a dereference of a null pointer (loaded from variable 'screen') # 1009| if (err != Success) # 1010| return err; # 1011|-> id = res->info[screen->myNum].id; # 1012| } # 1013| #endif Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/render.c:1021:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 1019| } # 1020| # 1021|-> err = BadAlloc; # 1022| nglyphs = stuff->nglyphs; # 1023| if (nglyphs > UINT32_MAX / sizeof(GlyphNewRec)) Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/render.c:1619:26: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>>' is a garbage value # 1617| cm.yhot = stuff->y; # 1618| rc = AllocARGBCursor(srcbits, mskbits, argbbits, &cm, # 1619|-> GetColor(twocolor[0], 16), # 1620| GetColor(twocolor[0], 8), # 1621| GetColor(twocolor[0], 0), Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/render.c:1622:26: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>>' is a garbage value # 1620| GetColor(twocolor[0], 8), # 1621| GetColor(twocolor[0], 0), # 1622|-> GetColor(twocolor[1], 16), # 1623| GetColor(twocolor[1], 8), # 1624| GetColor(twocolor[1], 0), Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/render/render.c:3252:20: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 3250| # 3251| FOR_NSCREENS_BACKWARD(j) { # 3252|-> stuff->pid = newPict->info[j].id; # 3253| result = # 3254| (*PanoramiXSaveRenderVector[X_RenderCreateConicalGradient]) Error: COMPILER_WARNING (CWE-252): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/bigreq/request-length.c: scope_hint: In function ‘main’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/bigreq/request-length.c:65:5: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ # 65 | write(fd, &xise_req, sizeof(xise_req)); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 63| # 64| /* Manually write out the bad request. XCB can't help us here.*/ # 65|-> write(fd, &xise_req, sizeof(xise_req)); # 66| # 67| /* Block until the server has processed our mess and throws an Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/damage/primitives.c: scope_hint: In function ‘compute_expected_damage’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/damage/primitives.c:68:48: warning[-Wanalyzer-malloc-leak]: leak of ‘get_image(setup, *setup.d)’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/damage/primitives.c:37: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/damage/primitives.c:364:5: note: in expansion of macro ‘test’ # 66| xcb_get_image_cookie_t cookie = # 67| xcb_get_image(setup->c, XCB_IMAGE_FORMAT_Z_PIXMAP, drawable, # 68|-> 0, 0, setup->width, setup->height, ~0); # 69| xcb_get_image_reply_t *reply = # 70| xcb_get_image_reply(setup->c, cookie, NULL); Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/damage/primitives.c: scope_hint: In function ‘get_image’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/damage/primitives.c:80:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘result’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 78| uint32_t *result = malloc(sizeof(uint32_t) * # 79| setup->width * setup->height); # 80|-> memcpy(result, data, len); # 81| free(reply); # 82| Error: CPPCHECK_WARNING (CWE-562): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/damage/primitives.c:185: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 183| printf("Testing %s\n", name); # 184| # 185|-> setup->expected = expected; # 186| setup->damaged = damaged; # 187| Error: CPPCHECK_WARNING (CWE-562): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/damage/primitives.c:186: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 184| # 185| setup->expected = expected; # 186|-> setup->damaged = damaged; # 187| # 188| /* Create our pixmap for this test and fill it with the Error: CPPCHECK_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/simple-xinit.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING (CWE-252): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/simple-xinit.c: scope_hint: In function ‘handle_sigchld’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/simple-xinit.c:69:5: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ # 69 | write(server_displayfd, server_dead, strlen(server_dead)); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 67| handle_sigchld(int sig) # 68| { # 69|-> write(server_displayfd, server_dead, strlen(server_dead)); # 70| } # 71| Error: CPPCHECK_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/test/sync/sync.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBAlloc.c: scope_hint: In function ‘SrvXkbAllocNames’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBAlloc.c:141:20: warning[-Wanalyzer-malloc-leak]: leak of ‘*type.level_names’ # 139| if (type->level_names == NULL) { # 140| type->level_names = calloc(type->num_levels, sizeof(Atom)); # 141|-> if (type->level_names == NULL) # 142| return BadAlloc; # 143| } Error: GCC_ANALYZER_WARNING (CWE-401): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBGAlloc.c: scope_hint: In function ‘SrvXkbAddGeomProperty’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBGAlloc.c:557:25: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.value’ # 555| if ((prop->name) && (strcmp(name, prop->name) == 0)) { # 556| free(prop->value); # 557|-> prop->value = strdup(value); # 558| return prop; # 559| } Error: COMPILER_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:664:21: warning[-Wuse-after-free]: pointer may be used after ‘reallocarray’ # 664 | free(prev_key_sym_map); # | ^~~~~~~~~~~~~~~~~~~~~~ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:660:41: note: call to ‘reallocarray’ here # 660 | xkb->map->key_sym_map = reallocarray(xkb->map->key_sym_map, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 661 | maxKC + 1, # | ~~~~~~~~~~ # 662 | sizeof(XkbSymMapRec)); # | ~~~~~~~~~~~~~~~~~~~~~ # 662| sizeof(XkbSymMapRec)); # 663| if (!xkb->map->key_sym_map) { # 664|-> free(prev_key_sym_map); # 665| return BadAlloc; # 666| } Error: COMPILER_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:685:21: warning[-Wuse-after-free]: pointer may be used after ‘reallocarray’ # 685 | free(prev_modmap); # | ^~~~~~~~~~~~~~~~~ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:681:36: note: call to ‘reallocarray’ here # 681 | xkb->map->modmap = reallocarray(xkb->map->modmap, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 682 | maxKC + 1, # | ~~~~~~~~~~ # 683 | sizeof(unsigned char)); # | ~~~~~~~~~~~~~~~~~~~~~~ # 683| sizeof(unsigned char)); # 684| if (!xkb->map->modmap) { # 685|-> free(prev_modmap); # 686| return BadAlloc; # 687| } Error: COMPILER_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:708:21: warning[-Wuse-after-free]: pointer may be used after ‘reallocarray’ # 708 | free(prev_behaviors); # | ^~~~~~~~~~~~~~~~~~~~ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:704:42: note: call to ‘reallocarray’ here # 704 | xkb->server->behaviors = reallocarray(xkb->server->behaviors, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 705 | maxKC + 1, # | ~~~~~~~~~~ # 706 | sizeof(XkbBehavior)); # | ~~~~~~~~~~~~~~~~~~~~ # 706| sizeof(XkbBehavior)); # 707| if (!xkb->server->behaviors) { # 708|-> free(prev_behaviors); # 709| return BadAlloc; # 710| } Error: COMPILER_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:730:21: warning[-Wuse-after-free]: pointer may be used after ‘reallocarray’ # 730 | free(prev_key_acts); # | ^~~~~~~~~~~~~~~~~~~ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:726:41: note: call to ‘reallocarray’ here # 726 | xkb->server->key_acts = reallocarray(xkb->server->key_acts, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 727 | maxKC + 1, # | ~~~~~~~~~~ # 728 | sizeof(unsigned short)); # | ~~~~~~~~~~~~~~~~~~~~~~~ # 728| sizeof(unsigned short)); # 729| if (!xkb->server->key_acts) { # 730|-> free(prev_key_acts); # 731| return BadAlloc; # 732| } Error: COMPILER_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:752:21: warning[-Wuse-after-free]: pointer may be used after ‘reallocarray’ # 752 | free(prev_vmodmap); # | ^~~~~~~~~~~~~~~~~~ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:748:40: note: call to ‘reallocarray’ here # 748 | xkb->server->vmodmap = reallocarray(xkb->server->vmodmap, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 749 | maxKC + 1, # | ~~~~~~~~~~ # 750 | sizeof(unsigned short)); # | ~~~~~~~~~~~~~~~~~~~~~~~ # 750| sizeof(unsigned short)); # 751| if (!xkb->server->vmodmap) { # 752|-> free(prev_vmodmap); # 753| return BadAlloc; # 754| } Error: COMPILER_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:774:17: warning[-Wuse-after-free]: pointer may be used after ‘reallocarray’ # 774 | free(prev_keys); # | ^~~~~~~~~~~~~~~ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/XKBMAlloc.c:771:32: note: call to ‘reallocarray’ here # 771 | xkb->names->keys = reallocarray(xkb->names->keys, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 772 | maxKC + 1, sizeof(XkbKeyNameRec)); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 772| maxKC + 1, sizeof(XkbKeyNameRec)); # 773| if (!xkb->names->keys) { # 774|-> free(prev_keys); # 775| return BadAlloc; # 776| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/ddxLoad.c: scope_hint: In function ‘XkbDDXLoadKeymapByNames’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/ddxLoad.c:388:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘keybd’ # 386| (names->geometry == NULL)) { # 387| LogMessage(X_ERROR, "XKB: No components provided for device %s\n", # 388|-> keybd->name ? keybd->name : "(unnamed keyboard)"); # 389| return 0; # 390| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c: scope_hint: In function ‘InputLineAddChar’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c:93:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘reallocarray(0, (long unsigned int)*line.sz_line, 2)’ where non-null expected xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c:141:21: note: in expansion of macro ‘ADD_CHAR’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c:141:21: note: in expansion of macro ‘ADD_CHAR’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c:141:21: note: in expansion of macro ‘ADD_CHAR’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c:141:21: note: in expansion of macro ‘ADD_CHAR’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/include/misc.h:119: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c:45: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c:92:26: note: in expansion of macro ‘xallocarray’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c:92:26: note: in expansion of macro ‘xallocarray’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 91| if (line->line == line->buf) { # 92| line->line = xallocarray(line->sz_line, 2); # 93|-> memcpy(line->line, line->buf, line->sz_line); # 94| } # 95| else { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/maprules.c:167:25: warning[deadcode.DeadStores]: Value stored to 'inComment' is never read # 165| DebugF("Line containing '!' ignored\n"); # 166| line->num_line = 0; # 167|-> inComment = 0; # 168| break; # 169| } Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbActions.c: scope_hint: In function ‘_XkbFilterLatchState’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbActions.c:239:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pAction’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbActions.c:40: included_from: Included from here. xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbActions.c:1462:1: note: in expansion of macro ‘XkbLatchGroup’ # 237| filter->priv = LATCH_KEY_DOWN; # 238| filter->filter = _XkbFilterLatchState; # 239|-> if (pAction->type == XkbSA_LatchMods) { # 240| filter->upAction = *pAction; # 241| xkbi->setMods = pAction->mods.mask; Error: GCC_ANALYZER_WARNING (CWE-476): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbActions.c: scope_hint: In function ‘_XkbNextFreeFilter’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbActions.c:1146:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*((struct _XkbSrvInfo *)xkbi).filters’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbActions.c:1462:1: note: in expansion of macro ‘XkbLatchGroup’ # 1144| } # 1145| for (i = 0; i < xkbi->szFilters; i++) { # 1146|-> if (!xkbi->filters[i].active) { # 1147| xkbi->filters[i].keycode = 0; # 1148| return &xkbi->filters[i]; Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:543:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'rmlvo_dflts.layout' # 541| dev->key = calloc(1, sizeof(*dev->key)); # 542| if (!dev->key) { # 543|-> ErrorF("XKB: Failed to allocate key class\n"); # 544| return FALSE; # 545| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:543:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'rmlvo_dflts.model' # 541| dev->key = calloc(1, sizeof(*dev->key)); # 542| if (!dev->key) { # 543|-> ErrorF("XKB: Failed to allocate key class\n"); # 544| return FALSE; # 545| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:543:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'rmlvo_dflts.options' # 541| dev->key = calloc(1, sizeof(*dev->key)); # 542| if (!dev->key) { # 543|-> ErrorF("XKB: Failed to allocate key class\n"); # 544| return FALSE; # 545| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:543:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'rmlvo_dflts.rules' # 541| dev->key = calloc(1, sizeof(*dev->key)); # 542| if (!dev->key) { # 543|-> ErrorF("XKB: Failed to allocate key class\n"); # 544| return FALSE; # 545| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbInit.c:543:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'rmlvo_dflts.variant' # 541| dev->key = calloc(1, sizeof(*dev->key)); # 542| if (!dev->key) { # 543|-> ErrorF("XKB: Failed to allocate key class\n"); # 544| return FALSE; # 545| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbLEDs.c:390:9: warning[deadcode.DeadStores]: Value stored to 'affect' is never read # 388| if (side_affected) { # 389| XkbUpdateLedAutoState(dev, sli, side_affected, &ed, &changes, cause); # 390|-> affect |= side_affected; # 391| } # 392| if (changes.state_changes || changes.ctrls.enabled_ctrls_changes) Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbLEDs.c:506:11: warning[core.NullDereference]: Access to field 'desc' results in a dereference of a null pointer (loaded from field 'xkbInfo') # 504| sli->mapsPresent &= ~which; # 505| # 506|-> xkb = dev->key->xkbInfo->desc; # 507| for (i = 0, bit = 1, map = sli->maps; i < XkbNumIndicators; # 508| i++, bit <<= 1, map++) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbLEDs.c:506:11: warning[core.NullDereference]: Access to field 'xkbInfo' results in a dereference of a null pointer (loaded from field 'key') # 504| sli->mapsPresent &= ~which; # 505| # 506|-> xkb = dev->key->xkbInfo->desc; # 507| for (i = 0, bit = 1, map = sli->maps; i < XkbNumIndicators; # 508| i++, bit <<= 1, map++) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbLEDs.c:649:17: warning[core.NullDereference]: Array access (via field 'names') results in a null pointer dereference # 647| sli->namesPresent = 0; # 648| for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { # 649|-> if (sli->names[i] != None) # 650| sli->namesPresent |= bit; # 651| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:77:9: warning[deadcode.DeadStores]: Value stored to 'rc' during its initialization is never read # 75| Mask access_mode, int *xkb_err) # 76| { # 77|-> int rc = XkbKeyboardErrorCode; # 78| # 79| if (id == XkbUseCoreKbd) Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c: scope_hint: In function ‘_XkbCopyClientMap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:955:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 953| # 954| } # 955|-> memcpy(dst->map->syms, src->map->syms, # 956| src->map->size_syms * sizeof(KeySym)); # 957| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:955:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 953| # 954| } # 955|-> memcpy(dst->map->syms, src->map->syms, # 956| src->map->size_syms * sizeof(KeySym)); # 957| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:973:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 971| dst->map->key_sym_map = tmp; # 972| } # 973|-> memcpy(dst->map->key_sym_map, src->map->key_sym_map, # 974| (src->max_key_code + 1) * sizeof(XkbSymMapRec)); # 975| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:973:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 971| dst->map->key_sym_map = tmp; # 972| } # 973|-> memcpy(dst->map->key_sym_map, src->map->key_sym_map, # 974| (src->max_key_code + 1) * sizeof(XkbSymMapRec)); # 975| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1149:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1147| dst->map->modmap = tmp; # 1148| } # 1149|-> memcpy(dst->map->modmap, src->map->modmap, src->max_key_code + 1); # 1150| } # 1151| else { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1149:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1147| dst->map->modmap = tmp; # 1148| } # 1149|-> memcpy(dst->map->modmap, src->map->modmap, src->max_key_code + 1); # 1150| } # 1151| else { Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c: scope_hint: In function ‘_XkbCopyServerMap’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1185:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1183| dst->server->explicit = tmp; # 1184| } # 1185|-> memcpy(dst->server->explicit, src->server->explicit, # 1186| src->max_key_code + 1); # 1187| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1185:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1183| dst->server->explicit = tmp; # 1184| } # 1185|-> memcpy(dst->server->explicit, src->server->explicit, # 1186| src->max_key_code + 1); # 1187| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1201:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1199| dst->server->acts = tmp; # 1200| } # 1201|-> memcpy(dst->server->acts, src->server->acts, # 1202| src->server->size_acts * sizeof(XkbAction)); # 1203| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1201:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1199| dst->server->acts = tmp; # 1200| } # 1201|-> memcpy(dst->server->acts, src->server->acts, # 1202| src->server->size_acts * sizeof(XkbAction)); # 1203| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1219:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1217| dst->server->key_acts = tmp; # 1218| } # 1219|-> memcpy(dst->server->key_acts, src->server->key_acts, # 1220| (src->max_key_code + 1) * sizeof(unsigned short)); # 1221| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1219:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1217| dst->server->key_acts = tmp; # 1218| } # 1219|-> memcpy(dst->server->key_acts, src->server->key_acts, # 1220| (src->max_key_code + 1) * sizeof(unsigned short)); # 1221| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1235:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1233| dst->server->behaviors = tmp; # 1234| } # 1235|-> memcpy(dst->server->behaviors, src->server->behaviors, # 1236| (src->max_key_code + 1) * sizeof(XkbBehavior)); # 1237| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1235:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1233| dst->server->behaviors = tmp; # 1234| } # 1235|-> memcpy(dst->server->behaviors, src->server->behaviors, # 1236| (src->max_key_code + 1) * sizeof(XkbBehavior)); # 1237| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1253:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1251| dst->server->vmodmap = tmp; # 1252| } # 1253|-> memcpy(dst->server->vmodmap, src->server->vmodmap, # 1254| (src->max_key_code + 1) * sizeof(unsigned short)); # 1255| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1253:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1251| dst->server->vmodmap = tmp; # 1252| } # 1253|-> memcpy(dst->server->vmodmap, src->server->vmodmap, # 1254| (src->max_key_code + 1) * sizeof(unsigned short)); # 1255| } Error: GCC_ANALYZER_WARNING (CWE-688): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c: scope_hint: In function ‘_XkbCopyNames’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1290:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1288| dst->names->keys = tmp; # 1289| } # 1290|-> memcpy(dst->names->keys, src->names->keys, # 1291| (src->max_key_code + 1) * sizeof(XkbKeyNameRec)); # 1292| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:1290:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1288| dst->names->keys = tmp; # 1289| } # 1290|-> memcpy(dst->names->keys, src->names->keys, # 1291| (src->max_key_code + 1) * sizeof(XkbKeyNameRec)); # 1292| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbUtils.c:2112:10: warning[deadcode.DeadStores]: Value stored to 'nG' is never read # 2110| *dst->ctrls = *src->ctrls; # 2111| # 2112|-> for (nG = nTG = 0, i = dst->min_key_code; i <= dst->max_key_code; i++) { # 2113| nG = XkbKeyNumGroups(dst, i); # 2114| if (nG >= XkbNumKbdGroups) { Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbfmisc.c:291:13: warning[deadcode.DeadStores]: Value stored to 'wantNames' is never read # 289| names->geometry = Xstrdup(tmp); # 290| complete |= XkmGeometryMask; # 291|-> wantNames &= ~XkmGeometryMask; # 292| } # 293| } Error: CLANG_WARNING: xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkbout.c:750:31: warning[core.NullDereference]: Access to field 'top' results in a dereference of a null pointer (loaded from variable 'row') # 748| fprintf(file, " row {\n"); # 749| fprintf(file, " top= %s;\n", # 750|-> XkbGeomFPText(row->top, XkbXKBFile)); # 751| fprintf(file, " left= %s;\n", # 752| XkbGeomFPText(row->left, XkbXKBFile)); Error: GCC_ANALYZER_WARNING (CWE-823): xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkmread.c: scope_hint: In function ‘XkmGetCountedString’ xorg-x11-server-Xwayland-23.2.4-build/xwayland-23.2.4/xkb/xkmread.c:152:20: warning[-Wanalyzer-tainted-offset]: use of attacker-controlled value as offset without upper-bounds checking # 150| str[max_len - 1] = '\0'; # 151| else # 152|-> str[count] = '\0'; # 153| count = XkbPaddedSize(nRead) - nRead; # 154| if (count > 0)