Task #323 - composefs-1.0.4-1.fc41/scan-results.err
back to task #323download
Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:25: included_from: Included from here. composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-erofs-internal.h:24: included_from: Included from here. composefs-1.0.4-build/composefs-1.0.4/libcomposefs/erofs_fs_wrapper.h:154: included_from: Included from here. composefs-1.0.4-build/composefs-1.0.4/libcomposefs/erofs_fs.h:435:15: warning[deadcode.DeadStores]: Value stored to 'fmh' during its initialization is never read # 433| static inline void erofs_check_ondisk_layout_definitions(void) # 434| { # 435|-> const __le64 fmh = *(__le64 *)&(struct z_erofs_map_header) { # 436| .h_clusterbits = 1 << Z_EROFS_FRAGMENT_INODE_BIT # 437| }; Error: CPPCHECK_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/hash.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-mount.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:1092:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'renamed' # 1090| colliding xattr */ # 1091| if (lcfs_node_rename_xattr(node, i, renamed) < 0) # 1092|-> return -1; # 1093| } # 1094| } Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:1535:8: warning[unix.Malloc]: Potential leak of memory pointed to by 'name' # 1533| # 1534| if (strcmp(name, OVERLAY_XATTR_REDIRECT) == 0) { # 1535|-> if ((node->inode.st_mode & S_IFMT) == S_IFREG) { # 1536| if (value_size > 1 && value[0] == '/') { # 1537| value_size++; Error: GCC_ANALYZER_WARNING (CWE-401): 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: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer-erofs.c:1634:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'new_ht_entry' # 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; # 1636| return NULL; Error: CLANG_WARNING: 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: CPPCHECK_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer.c:438:10: warning[unix.Malloc]: Potential leak of memory pointed to by 'list' # 436| list_size = listxattr(path, list, list_size); # 437| if (list_size < 0) { # 438|-> return list_size; # 439| } # 440| Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer.c:468:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'it' # 466| } # 467| } # 468|-> return r; # 469| } # 470| Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer.c:778:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'ret' # 776| r = readlinkat(dirfd, fname, target, sizeof(target) - 1); # 777| if (r < 0) # 778|-> return NULL; # 779| # 780| target[r] = '\0'; Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer.c:1219:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'new' # 1217| new->payload = strdup(node->payload); # 1218| if (new->payload == NULL) # 1219|-> return NULL; # 1220| ; # 1221| } Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer.c:1583:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'dup' # 1581| # 1582| if (index >= node->n_xattrs) { # 1583|-> errno = EINVAL; # 1584| return -1; # 1585| } Error: CPPCHECK_WARNING (CWE-401): composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer.c:1584: error[memleak]: Memory leak: dup # 1582| if (index >= node->n_xattrs) { # 1583| errno = EINVAL; # 1584|-> return -1; # 1585| } # 1586| Error: CPPCHECK_WARNING (CWE-401): composefs-1.0.4-build/composefs-1.0.4/libcomposefs/lcfs-writer.c:1590: error[memleak]: Memory leak: dup # 1588| free(xattr->key); # 1589| xattr->key = steal_pointer(&dup); # 1590|-> return 0; # 1591| } Error: CPPCHECK_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/cfs-fuse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/cfs-fuse.c:1055:3: warning[deadcode.DeadStores]: Value stored to 'size' is never read # 1053| iov[i].iov_base = (uint8_t *)tail_data; # 1054| iov[i++].iov_len = tail_send; # 1055|-> size -= tail_send; # 1056| } # 1057| Error: CPPCHECK_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/composefs-dump.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/composefs-info.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/composefs-info.c:222:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'hardlink_path' # 220| print_escaped_optional(hardlink_path ? hardlink_path : payload, -1, # 221| ESCAPE_LONE_DASH); # 222|-> printf(" "); # 223| print_escaped_optional((char *)content, size, ESCAPE_LONE_DASH); # 224| Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/composefs-info.c:292:18: warning[unix.Malloc]: Potential leak of memory pointed to by 'dup' # 290| } # 291| # 292|-> for (size_t i = 0; i < lcfs_node_get_n_children(node); i++) { # 293| struct lcfs_node_s *child = lcfs_node_get_child(node, i); # 294| get_objects(child, data, basedir_fd); Error: GCC_ANALYZER_WARNING (CWE-401): composefs-1.0.4-build/composefs-1.0.4/tools/composefs-info.c: scope_hint: In function ‘get_objects’ composefs-1.0.4-build/composefs-1.0.4/tools/composefs-info.c:296:1: warning[-Wanalyzer-malloc-leak]: leak of ‘dup’ # 294| get_objects(child, data, basedir_fd); # 295| } # 296|-> } # 297| # 298| static size_t str_ht_hash(const void *entry, size_t table_size) Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/composefs-info.c:480:28: warning[deadcode.DeadStores]: Although the value stored to 'image_path' is used in the enclosing expression, the value is never actually read from 'image_path' # 478| # 479| for (int i = 2; i < argc; i++) { # 480|-> const char *image_path = image_path = argv[i]; # 481| # 482| cleanup_fd int fd = open(image_path, O_RDONLY | O_CLOEXEC); Error: CPPCHECK_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/mkcomposefs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: 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| } Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/mkcomposefs.c:221:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'name' # 219| oom(); # 220| # 221|-> struct lcfs_node_s *child = lcfs_node_lookup_child(node, name); # 222| if (child == NULL) # 223| return NULL; Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/mkcomposefs.c:244:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'name' # 242| oom(); # 243| # 244|-> struct lcfs_node_s *child = lcfs_node_lookup_child(node, name); # 245| if (child == NULL) # 246| return NULL; Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/mkcomposefs.c:264:19: warning[unix.Malloc]: Potential leak of memory pointed to by 's' # 262| } # 263| # 264|-> return (uint64_t)v; # 265| } # 266| Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/mkcomposefs.c:588:2: warning[unix.Malloc]: Use of memory after it is freed # 586| # 587| /* memmove, as src may be in the buf */ # 588|-> memmove(buf->buf + buf->size, src, len); # 589| buf->size += len; # 590| } Error: CLANG_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/mkcomposefs.c:745:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'p' # 743| } while (p); # 744| # 745|-> return 0; # 746| } # 747| Error: CPPCHECK_WARNING: composefs-1.0.4-build/composefs-1.0.4/tools/mountcomposefs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.