Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
xwayland-24.1.9/Xext/panoramiX.c:748:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘PanoramiXDepths’
xwayland-24.1.9/Xext/panoramiX.c:802:1: enter_function: entry to ‘PanoramiXConsolidate’
xwayland-24.1.9/Xext/panoramiX.c:813:17: branch_true: following ‘true’ branch...
xwayland-24.1.9/Xext/panoramiX.c:814:9: branch_true: ...to here
xwayland-24.1.9/Xext/panoramiX.c:814:9: call_function: calling ‘PanoramiXMaybeAddDepth’ from ‘PanoramiXConsolidate’
#  746|       PanoramiXDepths = reallocarray(PanoramiXDepths,
#  747|                                      PanoramiXNumDepths, sizeof(DepthRec));
#  748|->     PanoramiXDepths[j].depth = pDepth->depth;
#  749|       PanoramiXDepths[j].numVids = 0;
#  750|       PanoramiXDepths[j].vids = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
xwayland-24.1.9/Xext/panoramiX.c:820:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘root’
xwayland-24.1.9/Xext/panoramiX.c:819:12: acquire_memory: this call could return NULL
xwayland-24.1.9/Xext/panoramiX.c:820:5: danger: ‘root’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  818|   
#  819|       root = malloc(sizeof(PanoramiXRes));
#  820|->     root->type = XRT_WINDOW;
#  821|       defmap = malloc(sizeof(PanoramiXRes));
#  822|       defmap->type = XRT_COLORMAP;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
xwayland-24.1.9/Xext/panoramiX.c:822:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘defmap’
xwayland-24.1.9/Xext/panoramiX.c:821:14: acquire_memory: this call could return NULL
xwayland-24.1.9/Xext/panoramiX.c:822:5: danger: ‘defmap’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  820|       root->type = XRT_WINDOW;
#  821|       defmap = malloc(sizeof(PanoramiXRes));
#  822|->     defmap->type = XRT_COLORMAP;
#  823|       saver = malloc(sizeof(PanoramiXRes));
#  824|       saver->type = XRT_WINDOW;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
xwayland-24.1.9/Xext/panoramiX.c:824:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘saver’
xwayland-24.1.9/Xext/panoramiX.c:823:13: acquire_memory: this call could return NULL
xwayland-24.1.9/Xext/panoramiX.c:824:5: danger: ‘saver’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  822|       defmap->type = XRT_COLORMAP;
#  823|       saver = malloc(sizeof(PanoramiXRes));
#  824|->     saver->type = XRT_WINDOW;
#  825|   
#  826|       FOR_NSCREENS(i) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
xwayland-24.1.9/glamor/glamor.c:926:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ps’
xwayland-24.1.9/glamor/glamor.c:904:1: enter_function: entry to ‘glamor_close_screen’
xwayland-24.1.9/glamor/glamor.c:908:27: branch_false: following ‘false’ branch...
xwayland-24.1.9/glamor/glamor.c:910:19: call_function: inlined call to ‘glamor_get_screen_private’ from ‘glamor_close_screen’
xwayland-24.1.9/glamor/glamor.c:910:19: call_function: inlined call to ‘glamor_get_screen_private’ from ‘glamor_close_screen’
xwayland-24.1.9/glamor/glamor.c:913:5: call_function: calling ‘glamor_set_glvnd_vendor’ from ‘glamor_close_screen’
xwayland-24.1.9/glamor/glamor.c:913:5: return_function: returning to ‘glamor_close_screen’ from ‘glamor_set_glvnd_vendor’
xwayland-24.1.9/glamor/glamor.c:926:5: danger: dereference of NULL ‘ps’
#  924|       screen->BlockHandler = glamor_priv->saved_procs.block_handler;
#  925|   
#  926|->     ps->Composite = glamor_priv->saved_procs.composite;
#  927|       ps->Trapezoids = glamor_priv->saved_procs.trapezoids;
#  928|       ps->Triangles = glamor_priv->saved_procs.triangles;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
xwayland-24.1.9/glamor/glamor_core.c:205:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
xwayland-24.1.9/glamor/glamor_core.c:195:1: enter_function: entry to ‘glamor_validate_gc’
xwayland-24.1.9/glamor/glamor_core.c:201:8: branch_true: following ‘true’ branch...
xwayland-24.1.9/glamor/glamor_core.c:202:13: branch_true: ...to here
xwayland-24.1.9/glamor/glamor_core.c:202:12: branch_true: following ‘true’ branch...
xwayland-24.1.9/glamor/glamor_core.c:204:17: branch_true: ...to here
xwayland-24.1.9/glamor/glamor_core.c:204:17: call_function: inlined call to ‘glamor_get_pixmap_private’ from ‘glamor_validate_gc’
xwayland-24.1.9/glamor/glamor_core.c:205:19: branch_true: ...to here
xwayland-24.1.9/glamor/glamor_core.c:205:19: danger: dereference of NULL ‘<unknown>’
#  203|               glamor_pixmap_private *pixmap_priv =
#  204|                   glamor_get_pixmap_private(gc->tile.pixmap);
#  205|->             if ((!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv))
#  206|                   && FbEvenTile(gc->tile.pixmap->drawable.width *
#  207|                                 drawable->bitsPerPixel)) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
xwayland-24.1.9/glamor/glamor_dash.c:152:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
xwayland-24.1.9/glamor/glamor_dash.c:241:1: enter_function: entry to ‘glamor_poly_lines_dash_gl’
xwayland-24.1.9/glamor/glamor_dash.c:253:8: branch_false: following ‘false’ branch (when ‘n > 1’)...
xwayland-24.1.9/glamor/glamor_dash.c:256:18: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_dash.c:256:18: call_function: calling ‘glamor_dash_setup’ from ‘glamor_poly_lines_dash_gl’
#  150|       dash_priv = glamor_get_pixmap_private(dash_pixmap);
#  151|   
#  152|->     if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(dash_priv))
#  153|           goto bail;
#  154|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
xwayland-24.1.9/glamor/glamor_largepixmap.c:130:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘clipped_regions’
xwayland-24.1.9/glamor/glamor_largepixmap.c:1022:1: enter_function: entry to ‘glamor_composite_largepixmap_region’
xwayland-24.1.9/glamor/glamor_largepixmap.c:1041:47: call_function: inlined call to ‘glamor_get_pixmap_private’ from ‘glamor_composite_largepixmap_region’
xwayland-24.1.9/glamor/glamor_largepixmap.c:1061:8: branch_false: following ‘false’ branch (when ‘dest_pixmap != source_pixmap’)...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1065:8: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1065:8: branch_false: following ‘false’ branch (when ‘dest_pixmap != mask_pixmap’)...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1070:9: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1070:8: branch_false: following ‘false’ branch...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1075:8: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1109:8: branch_false: following ‘false’ branch...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1132:8: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1132:8: branch_false: following ‘false’ branch...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1155:9: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1155:8: branch_true: following ‘true’ branch...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1158:13: branch_true: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1158:13: call_function: calling ‘glamor_compute_clipped_regions_ext’ from ‘glamor_composite_largepixmap_region’
#  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): [#def9]
xwayland-24.1.9/glamor/glamor_largepixmap.c:235:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result_regions’
xwayland-24.1.9/glamor/glamor_largepixmap.c:1022:1: enter_function: entry to ‘glamor_composite_largepixmap_region’
xwayland-24.1.9/glamor/glamor_largepixmap.c:1041:47: call_function: inlined call to ‘glamor_get_pixmap_private’ from ‘glamor_composite_largepixmap_region’
xwayland-24.1.9/glamor/glamor_largepixmap.c:1061:8: branch_false: following ‘false’ branch (when ‘dest_pixmap != source_pixmap’)...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1065:8: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1065:8: branch_false: following ‘false’ branch (when ‘dest_pixmap != mask_pixmap’)...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1070:9: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1070:8: branch_false: following ‘false’ branch...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1075:8: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1109:8: branch_false: following ‘false’ branch...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1132:8: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1132:8: branch_false: following ‘false’ branch...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1155:9: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1155:8: branch_true: following ‘true’ branch...
xwayland-24.1.9/glamor/glamor_largepixmap.c:1158:13: branch_true: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:1158:13: call_function: calling ‘glamor_compute_clipped_regions_ext’ from ‘glamor_composite_largepixmap_region’
#  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): [#def10]
xwayland-24.1.9/glamor/glamor_largepixmap.c:365:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘clipped_regions’
xwayland-24.1.9/glamor/glamor_largepixmap.c:690:1: enter_function: entry to ‘glamor_compute_transform_clipped_regions’
xwayland-24.1.9/glamor/glamor_largepixmap.c:696:35: call_function: inlined call to ‘glamor_get_pixmap_private’ from ‘glamor_compute_transform_clipped_regions’
xwayland-24.1.9/glamor/glamor_largepixmap.c:696:35: call_function: inlined call to ‘glamor_get_pixmap_private’ from ‘glamor_compute_transform_clipped_regions’
xwayland-24.1.9/glamor/glamor_largepixmap.c:716:8: branch_false: following ‘false’ branch (when ‘transform’ is NULL)...
xwayland-24.1.9/glamor/glamor_largepixmap.c:718:8: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_largepixmap.c:734:11: call_function: calling ‘_glamor_compute_clipped_regions’ from ‘glamor_compute_transform_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: GCC_ANALYZER_WARNING (CWE-476): [#def11]
xwayland-24.1.9/glamor/glamor_render.c:1577:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
xwayland-24.1.9/glamor/glamor_render.c:1490:1: enter_function: entry to ‘glamor_composite_clipped_region’
xwayland-24.1.9/glamor/glamor_render.c:1527:12: call_function: inlined call to ‘RegionNumRects’ from ‘glamor_composite_clipped_region’
xwayland-24.1.9/glamor/glamor_render.c:1528:13: branch_false: ...to here
xwayland-24.1.9/glamor/glamor_render.c:1574:12: branch_true: following ‘true’ branch...
xwayland-24.1.9/glamor/glamor_render.c:1577:21: branch_true: ...to here
xwayland-24.1.9/glamor/glamor_render.c:1577:21: danger: dereference of NULL ‘<unknown>’
# 1575|                && (source->pSourcePict->type != SourcePictTypeSolidFill))
# 1576|               || (source->pDrawable
# 1577|->                 && !GLAMOR_PIXMAP_PRIV_HAS_FBO(source_pixmap_priv)
# 1578|                   && (source_pixmap->drawable.width != width
# 1579|                       || source_pixmap->drawable.height != height)))) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def12]
xwayland-24.1.9/os/utils.c:1409:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(file,  type)’ where non-null expected
xwayland-24.1.9/os/utils.c:1403:8: branch_false: following ‘false’ branch...
xwayland-24.1.9/os/utils.c:1406:11: branch_false: ...to here
xwayland-24.1.9/os/utils.c:1406:11: acquire_memory: this call could return NULL
xwayland-24.1.9/os/utils.c:1408:8: branch_true: following ‘true’ branch...
xwayland-24.1.9/os/utils.c:1409:9: branch_true: ...to here
xwayland-24.1.9/os/utils.c:1409:9: danger: argument 1 (‘fopen(file,  type)’) from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
# 1407|   
# 1408|       if (seteuid(euid) == -1) {
# 1409|->         fclose(iop);
# 1410|           return NULL;
# 1411|       }

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.95.0
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-4.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namexorg-x11-server-Xwayland-24.1.11-1.fc45
diffbase-store-results-to/tmp/tmpfropopra/xorg-x11-server-Xwayland-24.1.11-1.fc45.tar.xz
diffbase-time-created2026-06-01 17:32:46
diffbase-time-finished2026-06-01 17:35:50
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpfropopra/xorg-x11-server-Xwayland-24.1.11-1.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpfropopra/xorg-x11-server-Xwayland-24.1.11-1.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-4.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namexorg-x11-server-Xwayland-24.1.9-2.fc44
store-results-to/tmp/tmpu18h_2at/xorg-x11-server-Xwayland-24.1.9-2.fc44.tar.xz
time-created2026-06-01 17:28:40
time-finished2026-06-01 17:32:15
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpu18h_2at/xorg-x11-server-Xwayland-24.1.9-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpu18h_2at/xorg-x11-server-Xwayland-24.1.9-2.fc44.src.rpm'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9