Task #323 - fixed.err

back to task #323
download
Error: GCC_ANALYZER_WARNING (CWE-401):
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-internal.h:203:17: warning[-Wanalyzer-malloc-leak]: leak of 'new_ht_entry'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c: scope_hint: In function 'lcfs_build_node_from_image'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-internal.h:29: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1851:13: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1856:13: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1863:13: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1870:17: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c: scope_hint: In function 'lcfs_build_node_from_image'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:25: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-erofs-internal.h:44:29: note: in expansion of macro 'lcfs_u16_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c: scope_hint: In function 'lcfs_build_node_from_image'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1482:32: note: in expansion of macro 'lcfs_u64_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c: scope_hint: In function 'lcfs_build_node_from_image'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-utils.h:23: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:22: included_from: Included from here.
#  201|   {
#  202|   	if (*nodep != NULL) {
#  203|-> 		lcfs_node_unref(*nodep);
#  204|   		*nodep = NULL;
#  205|   	}

Error: CLANG_WARNING:
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-mount.c:422:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'opt'
#  420|   		strcat(opt, objdir);
#  421|   
#  422|-> 		res = syscall_fsconfig(fd_fs, FSCONFIG_SET_STRING, "lowerdir",
#  423|   				       opt, 0);
#  424|   		if (res < 0) {

Error: CLANG_WARNING:
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:356:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'new_ent'
#  354|   				}
#  355|   				new_ent->xattr = &node->xattrs[i];
#  356|-> 				ent = hash_insert(xattr_hash, new_ent);
#  357|   				if (ent == NULL) {
#  358|   					goto fail;

Error: GCC_ANALYZER_WARNING (CWE-457):
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c: scope_hint: In function ‘print_escaped’
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:60:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*val’
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:33: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-utils.h:22: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:23: included_from: Included from here.
/usr/include/string.h:407:15: note: argument 1 of ‘strlen’ must be a pointer to a null-terminated string
#   58|   
#   59|   	if (len < 0)
#   60|-> 		len = strlen(val);
#   61|   
#   62|   	if (escape_lone_dash && len == 1 && val[0] == '-') {