Newly introduced defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c: scope_hint: In function 'lcfs_build_node_from_image'
composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:1633:12: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(16)'
composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-internal.h:29: included_from: Included from here.
composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:21: included_from: Included from here.
composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:1860:13: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:1865:13: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:1872:13: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:1879:17: note: in expansion of macro 'lcfs_u32_from_file'
# 1631|   	new_ht_entry->nid = nid;
# 1632|   	new_ht_entry->node = node;
# 1633|-> 	if (hash_insert(data->node_hash, new_ht_entry) == NULL) {
# 1634|   		lcfs_node_unref(node);
# 1635|   		errno = ENOMEM;

Error: CLANG_WARNING: [#def2]
composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:1751:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'content'
# 1749|   			memcpy(content + oob_size, tail_data, tail_size);
# 1750|   
# 1751|-> 		ret = lcfs_node_set_content(node, content, file_size);
# 1752|   		if (ret < 0) {
# 1753|   			return NULL;

Error: CLANG_WARNING: [#def3]
composefs-1.0.4-build/composefs-1.0.4/tools/mkcomposefs.c:134:12: warning[unix.Malloc]: Potential leak of memory pointed to by 'out'
#  132|   		if (c == '\\') {
#  133|   			if (escaped >= escaped_end) {
#  134|-> 				*err = make_error("No character after escape");
#  135|   				return NULL;
#  136|   			}

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-40.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namecomposefs-1.0.3-1.fc40
diffbase-store-results-to/tmp/tmpee0gs7gi/composefs-1.0.3-1.fc40.tar.xz
diffbase-time-created2024-07-03 12:07:34
diffbase-time-finished2024-07-03 12:09:09
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpee0gs7gi/composefs-1.0.3-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpee0gs7gi/composefs-1.0.3-1.fc40.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-40.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namecomposefs-1.0.4-1.fc41
store-results-to/tmp/tmpw69xlp74/composefs-1.0.4-1.fc41.tar.xz
time-created2024-07-03 12:09:17
time-finished2024-07-03 12:10:26
titleNewly introduced defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpw69xlp74/composefs-1.0.4-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpw69xlp74/composefs-1.0.4-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9