Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
leptonica-1.85.0/src/utils2.c:2179:11: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
leptonica-1.85.0/src/utils2.c:2152:1: enter_function: entry to ‘lept_mkdir’
leptonica-1.85.0/src/utils2.c:2162:8: branch_false: following ‘false’ branch...
leptonica-1.85.0/src/utils2.c:2168:8: branch_false: ...to here
leptonica-1.85.0/src/utils2.c:2168:8: branch_false: following ‘false’ branch (when ‘subdir’ is non-NULL)...
leptonica-1.85.0/src/utils2.c:2170:9: branch_false: ...to here
leptonica-1.85.0/src/utils2.c:2170:8: branch_false: following ‘false’ branch...
leptonica-1.85.0/src/utils2.c:2176:11: call_function: calling ‘genPathname’ from ‘lept_mkdir’
leptonica-1.85.0/src/utils2.c:2176:11: return_function: returning to ‘lept_mkdir’ from ‘genPathname’
leptonica-1.85.0/src/utils2.c:2179:11: danger: argument 1 (‘genPathname("/tmp", 0)’) NULL where non-null expected
# 2177|          /* Make sure the tmp directory exists */
# 2178|   #ifndef _WIN32
# 2179|->     ret = mkdir(dir, 0777);
# 2180|   #else
# 2181|       attributes = GetFileAttributesA(dir);

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
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-12.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.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameleptonica-1.87.0-1.fc44
diffbase-store-results-to/tmp/tmpqvb2zxve/leptonica-1.87.0-1.fc44.tar.xz
diffbase-time-created2026-01-08 18:47:58
diffbase-time-finished2026-01-08 18:57:50
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpqvb2zxve/leptonica-1.87.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpqvb2zxve/leptonica-1.87.0-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-12.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameleptonica-1.85.0-4.fc43
store-results-to/tmp/tmpqvvz57rz/leptonica-1.85.0-4.fc43.tar.xz
time-created2026-01-08 18:36:41
time-finished2026-01-08 18:47:00
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpqvvz57rz/leptonica-1.85.0-4.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpqvvz57rz/leptonica-1.85.0-4.fc43.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9