Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] pyparted-3.13.0/src/pydevice.c:667:9: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’ pyparted-3.13.0/src/pydevice.c:641:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydevice.c:645:14: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:647:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydevice.c:651:10: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:651:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydevice.c:656:9: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:656:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydevice.c:661:22: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:661:15: acquire_memory: allocated here pyparted-3.13.0/src/pydevice.c:663:8: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)... pyparted-3.13.0/src/pydevice.c:667:9: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:667:9: danger: ‘out_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8) # 665| } # 666| # 667|-> if (ped_device_read(device, out_buf, start, count) == 0) { # 668| if (partedExnRaised) { # 669| partedExnRaised = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] pyparted-3.13.0/src/pydevice.c:859:11: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’ pyparted-3.13.0/src/pydevice.c:833:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydevice.c:837:14: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:839:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydevice.c:843:10: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:843:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydevice.c:848:9: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:848:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydevice.c:853:22: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:853:15: acquire_memory: allocated here pyparted-3.13.0/src/pydevice.c:855:8: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)... pyparted-3.13.0/src/pydevice.c:859:11: branch_false: ...to here pyparted-3.13.0/src/pydevice.c:859:11: danger: ‘out_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8) # 857| } # 858| # 859|-> ret = ped_device_check(device, out_buf, start, count); # 860| free(out_buf); # 861| return PyLong_FromLongLong(ret); Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] pyparted-3.13.0/src/pydisk.c:2250:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ pyparted-3.13.0/src/pydisk.c:2224:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydisk.c:2228:14: branch_false: ...to here pyparted-3.13.0/src/pydisk.c:2230:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydisk.c:2234:12: branch_false: ...to here pyparted-3.13.0/src/pydisk.c:2236:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydisk.c:2240:12: branch_false: ...to here pyparted-3.13.0/src/pydisk.c:2242:8: branch_true: following ‘true’ branch... pyparted-3.13.0/src/pydisk.c:2243:13: branch_true: ...to here pyparted-3.13.0/src/pydisk.c:2243:12: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydisk.c:2250:17: branch_false: ...to here pyparted-3.13.0/src/pydisk.c:2250:17: danger: dereference of NULL ‘0’ # 2248| } # 2249| } else { # 2250|-> if (disk->dev == NULL) { # 2251| PyErr_Format(DiskException, "Could not create new disk label"); # 2252| } else { Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] pyparted-3.13.0/src/pydisk.c:2291:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ pyparted-3.13.0/src/pydisk.c:2271:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydisk.c:2275:14: branch_false: ...to here pyparted-3.13.0/src/pydisk.c:2277:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydisk.c:2281:12: branch_false: ...to here pyparted-3.13.0/src/pydisk.c:2283:8: branch_true: following ‘true’ branch... pyparted-3.13.0/src/pydisk.c:2284:13: branch_true: ...to here pyparted-3.13.0/src/pydisk.c:2284:12: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pydisk.c:2291:17: branch_false: ...to here pyparted-3.13.0/src/pydisk.c:2291:17: danger: dereference of NULL ‘0’ # 2289| } # 2290| } else { # 2291|-> if (disk->dev == NULL) { # 2292| PyErr_Format(DiskException, "Could not create new disk label"); # 2293| } else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] pyparted-3.13.0/src/pygeom.c:587:9: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’ pyparted-3.13.0/src/pygeom.c:559:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pygeom.c:563:12: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:565:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pygeom.c:570:9: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:570:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pygeom.c:576:9: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:576:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pygeom.c:581:15: acquire_memory: allocated here pyparted-3.13.0/src/pygeom.c:583:8: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)... pyparted-3.13.0/src/pygeom.c:587:9: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:587:9: danger: ‘out_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8) # 585| } # 586| # 587|-> if (ped_geometry_read(geom, out_buf, offset, count) == 0) { # 588| if (partedExnRaised) { # 589| partedExnRaised = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] pyparted-3.13.0/src/pygeom.c:749:11: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’ pyparted-3.13.0/src/pygeom.c:716:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pygeom.c:720:12: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:722:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pygeom.c:726:10: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:726:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pygeom.c:731:9: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:731:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pygeom.c:736:9: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:736:8: branch_false: following ‘false’ branch... pyparted-3.13.0/src/pygeom.c:742:22: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:742:15: acquire_memory: allocated here pyparted-3.13.0/src/pygeom.c:744:8: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)... pyparted-3.13.0/src/pygeom.c:749:11: branch_false: ...to here pyparted-3.13.0/src/pygeom.c:749:11: danger: ‘out_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10) # 747| } # 748| # 749|-> ret = ped_geometry_check(geom, out_buf, 32, offset, granularity, count, out_timer); # 750| ped_timer_destroy(out_timer); # 751| free(out_buf);
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-85.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-gcc-latest-x86_64 |
| project-name | pyparted-3.13.0-13.fc44 |
| store-results-to | /tmp/tmph5y63jsd/pyparted-3.13.0-13.fc44.tar.xz |
| time-created | 2025-10-28 19:51:43 |
| time-finished | 2025-10-28 19:53:01 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmph5y63jsd/pyparted-3.13.0-13.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmph5y63jsd/pyparted-3.13.0-13.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |