Fixed defects

List of Defects

Error: CLANG_WARNING: [#def1]
buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:235:12: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  233|   		return -1;
#  234|   	}
#  235|-> 	exename = basename(argv[0]);
#  236|   	mmfd = syscall(SYS_memfd_create, exename, (long) MFD_ALLOW_SEALING | MFD_CLOEXEC);
#  237|   	if (mmfd == -1) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def2]
buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘copy_self_proc_exe’
buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:235:19: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:14: included_from: Included from here.
/usr/include/string.h:540:14: note: argument 1 of ‘basename’ must be non-null
#  233|   		return -1;
#  234|   	}
#  235|-> 	exename = basename(argv[0]);
#  236|   	mmfd = syscall(SYS_memfd_create, exename, (long) MFD_ALLOW_SEALING | MFD_CLOEXEC);
#  237|   	if (mmfd == -1) {

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-48.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namebuildah-1.36.0-1.fc41
diffbase-store-results-to/tmp/tmpa7bjuno4/buildah-1.36.0-1.fc41.tar.xz
diffbase-time-created2024-07-03 12:17:40
diffbase-time-finished2024-07-03 12:28:53
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpa7bjuno4/buildah-1.36.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpa7bjuno4/buildah-1.36.0-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-48.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namebuildah-1.35.1-1.fc40
store-results-to/tmp/tmpcoyphq92/buildah-1.35.1-1.fc40.tar.xz
time-created2024-07-03 12:04:56
time-finished2024-07-03 12:17:07
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpcoyphq92/buildah-1.35.1-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpcoyphq92/buildah-1.35.1-1.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9