erofs-utils-1.8.10-3.fc44
List of Findings
Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
erofs-utils-1.8.10/contrib/stress.c:127:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(subpath)’
erofs-utils-1.8.10/contrib/stress.c:763:5: enter_function: entry to ‘main’
erofs-utils-1.8.10/contrib/stress.c:770:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/contrib/stress.c:776:15: branch_false: ...to here
erofs-utils-1.8.10/contrib/stress.c:776:15: call_function: calling ‘init_filetable’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
erofs-utils-1.8.10/contrib/stress.c:164:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath)’
erofs-utils-1.8.10/contrib/stress.c:763:5: enter_function: entry to ‘main’
erofs-utils-1.8.10/contrib/stress.c:770:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/contrib/stress.c:776:15: branch_false: ...to here
erofs-utils-1.8.10/contrib/stress.c:776:15: call_function: calling ‘init_filetable’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
erofs-utils-1.8.10/contrib/stress.c:759:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘freq_table’
erofs-utils-1.8.10/contrib/stress.c:753:22: acquire_memory: this call could return NULL
erofs-utils-1.8.10/contrib/stress.c:755:30: branch_true: following ‘true’ branch...
erofs-utils-1.8.10/contrib/stress.c:756:21: branch_true: ...to here
erofs-utils-1.8.10/contrib/stress.c:758:29: branch_true: following ‘true’ branch...
erofs-utils-1.8.10/contrib/stress.c:759:43: branch_true: ...to here
erofs-utils-1.8.10/contrib/stress.c:759:25: danger: ‘malloc((long unsigned int)f * 4) + (long unsigned int)i * 4’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
erofs-utils-1.8.10/dump/main.c:707:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer_ptr’
erofs-utils-1.8.10/dump/main.c:684:20: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/dump/main.c:696:23: branch_false: ...to here
erofs-utils-1.8.10/dump/main.c:697:22: acquire_memory: allocated here
erofs-utils-1.8.10/dump/main.c:698:12: branch_false: following ‘false’ branch (when ‘buffer_ptr’ is non-NULL)...
erofs-utils-1.8.10/dump/main.c:703:9: branch_false: ...to here
erofs-utils-1.8.10/dump/main.c:705:16: branch_true: following ‘true’ branch (when ‘pending_size != 0’)...
erofs-utils-1.8.10/dump/main.c:706:17: branch_true: ...to here
erofs-utils-1.8.10/dump/main.c:707:23: throw: if ‘erofs_pread’ throws an exception...
erofs-utils-1.8.10/dump/main.c:707:23: danger: ‘buffer_ptr’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
erofs-utils-1.8.10/dump/main.c:716:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer_ptr’
erofs-utils-1.8.10/dump/main.c:684:20: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/dump/main.c:696:23: branch_false: ...to here
erofs-utils-1.8.10/dump/main.c:697:22: acquire_memory: allocated here
erofs-utils-1.8.10/dump/main.c:698:12: branch_false: following ‘false’ branch (when ‘buffer_ptr’ is non-NULL)...
erofs-utils-1.8.10/dump/main.c:703:9: branch_false: ...to here
erofs-utils-1.8.10/dump/main.c:705:16: branch_false: following ‘false’ branch (when ‘pending_size == 0’)...
erofs-utils-1.8.10/dump/main.c:716:9: branch_false: ...to here
erofs-utils-1.8.10/dump/main.c:716:9: throw: if ‘fflush’ throws an exception...
erofs-utils-1.8.10/dump/main.c:716:9: danger: ‘buffer_ptr’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-415): [#def6]
erofs-utils-1.8.10/fsck/main.c:580:45: warning[-Wanalyzer-double-free]: double-‘free’ of ‘buffer’
erofs-utils-1.8.10/fsck/main.c:951:12: enter_function: entry to ‘erofsfsck_check_inode’
erofs-utils-1.8.10/fsck/main.c:958:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/fsck/main.c:965:15: branch_false: ...to here
erofs-utils-1.8.10/fsck/main.c:965:12: branch_true: following ‘true’ branch...
erofs-utils-1.8.10/fsck/main.c:972:15: call_function: calling ‘erofsfsck_extract_inode’ from ‘erofsfsck_check_inode’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
erofs-utils-1.8.10/fsck/main.c:587:31: warning[-Wanalyzer-malloc-leak]: leak of ‘raw’
erofs-utils-1.8.10/fsck/main.c:951:12: enter_function: entry to ‘erofsfsck_check_inode’
erofs-utils-1.8.10/fsck/main.c:958:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/fsck/main.c:965:15: branch_false: ...to here
erofs-utils-1.8.10/fsck/main.c:965:12: branch_true: following ‘true’ branch...
erofs-utils-1.8.10/fsck/main.c:972:15: call_function: calling ‘erofsfsck_extract_inode’ from ‘erofsfsck_check_inode’
Error: CPPCHECK_WARNING (CWE-401): [#def8]
erofs-utils-1.8.10/fsck/main.c:707: error[memleak]: Memory leak: entry
Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
erofs-utils-1.8.10/fuse/main.c:190:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
erofs-utils-1.8.10/fuse/main.c:173:15: acquire_memory: allocated here
erofs-utils-1.8.10/fuse/main.c:174:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:178:9: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:190:15: throw: if ‘erofs_iterate_dir’ throws an exception...
erofs-utils-1.8.10/fuse/main.c:190:15: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
erofs-utils-1.8.10/fuse/main.c:242:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vi’
erofs-utils-1.8.10/fuse/main.c:234:14: acquire_memory: allocated here
erofs-utils-1.8.10/fuse/main.c:235:12: branch_false: following ‘false’ branch (when ‘vi’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:240:9: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:242:15: throw: if ‘erofs_read_inode_from_disk’ throws an exception...
erofs-utils-1.8.10/fuse/main.c:242:15: danger: ‘vi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
erofs-utils-1.8.10/fuse/main.c:292:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vi’
erofs-utils-1.8.10/fuse/main.c:284:14: acquire_memory: allocated here
erofs-utils-1.8.10/fuse/main.c:285:12: branch_false: following ‘false’ branch (when ‘vi’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:290:9: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:292:15: throw: if ‘erofs_read_inode_from_disk’ throws an exception...
erofs-utils-1.8.10/fuse/main.c:292:15: danger: ‘vi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
erofs-utils-1.8.10/fuse/main.c:335:15: warning[-Wanalyzer-malloc-leak]: leak of ‘vi’
erofs-utils-1.8.10/fuse/main.c:327:14: acquire_memory: allocated here
erofs-utils-1.8.10/fuse/main.c:328:12: branch_false: following ‘false’ branch (when ‘vi’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:333:9: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:335:15: throw: if ‘erofs_read_inode_from_disk’ throws an exception...
erofs-utils-1.8.10/fuse/main.c:335:15: danger: ‘vi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
erofs-utils-1.8.10/fuse/main.c:381:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
erofs-utils-1.8.10/fuse/main.c:375:15: acquire_memory: allocated here
erofs-utils-1.8.10/fuse/main.c:376:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:381:15: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:381:15: throw: if ‘erofs_pread’ throws an exception...
erofs-utils-1.8.10/fuse/main.c:381:15: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
erofs-utils-1.8.10/fuse/main.c:417:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
erofs-utils-1.8.10/fuse/main.c:406:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/fuse/main.c:411:22: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:411:15: acquire_memory: allocated here
erofs-utils-1.8.10/fuse/main.c:412:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:417:15: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:417:15: throw: if ‘erofs_pread’ throws an exception...
erofs-utils-1.8.10/fuse/main.c:417:15: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
erofs-utils-1.8.10/fuse/main.c:458:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
erofs-utils-1.8.10/fuse/main.c:445:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/fuse/main.c:450:12: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:450:12: branch_true: following ‘true’ branch (when ‘size != 0’)...
erofs-utils-1.8.10/fuse/main.c:451:23: branch_true: ...to here
erofs-utils-1.8.10/fuse/main.c:451:23: acquire_memory: allocated here
erofs-utils-1.8.10/fuse/main.c:452:20: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:458:15: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:458:15: throw: if ‘erofs_getxattr’ throws an exception...
erofs-utils-1.8.10/fuse/main.c:458:15: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
erofs-utils-1.8.10/fuse/main.c:491:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
erofs-utils-1.8.10/fuse/main.c:478:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/fuse/main.c:483:12: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:483:12: branch_true: following ‘true’ branch (when ‘size != 0’)...
erofs-utils-1.8.10/fuse/main.c:484:23: branch_true: ...to here
erofs-utils-1.8.10/fuse/main.c:484:23: acquire_memory: allocated here
erofs-utils-1.8.10/fuse/main.c:485:20: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:491:15: branch_false: ...to here
erofs-utils-1.8.10/fuse/main.c:491:15: throw: if ‘erofs_listxattr’ throws an exception...
erofs-utils-1.8.10/fuse/main.c:491:15: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-479): [#def17]
erofs-utils-1.8.10/fuse/main.c:619:25: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘fprintf’ from within signal handler
erofs-utils-1.8.10/fuse/main.c:631:5: enter_function: entry to ‘main’
erofs-utils-1.8.10/fuse/main.c:606:13: enter_function: entry to ‘signal_handle_sigsegv’
erofs-utils-1.8.10/fuse/main.c:617:12: branch_true: following ‘true’ branch (when ‘strings’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:617:12: branch_true: ...to here
erofs-utils-1.8.10/fuse/main.c:618:29: branch_true: following ‘true’ branch (when ‘i < nptrs’)...
erofs-utils-1.8.10/fuse/main.c:619:25: branch_true: ...to here
erofs-utils-1.8.10/fuse/main.c:619:25: danger: call to ‘fprintf’ from within signal handler
Error: GCC_ANALYZER_WARNING (CWE-479): [#def18]
erofs-utils-1.8.10/fuse/main.c:620:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘free’ from within signal handler
erofs-utils-1.8.10/fuse/main.c:631:5: enter_function: entry to ‘main’
erofs-utils-1.8.10/fuse/main.c:606:13: enter_function: entry to ‘signal_handle_sigsegv’
erofs-utils-1.8.10/fuse/main.c:617:12: branch_true: following ‘true’ branch (when ‘strings’ is non-NULL)...
erofs-utils-1.8.10/fuse/main.c:617:12: branch_true: ...to here
erofs-utils-1.8.10/fuse/main.c:620:17: danger: call to ‘free’ from within signal handler
Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
erofs-utils-1.8.10/include/erofs/hashmap.h:71:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'e'
erofs-utils-1.8.10/lib/hashmap.c:259:13: enter_function: entry to 'memintern'
erofs-utils-1.8.10/lib/hashmap.c:272:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/hashmap.c:274:17: call_function: inlined call to 'st_add' from 'memintern'
erofs-utils-1.8.10/lib/hashmap.c:274:17: acquire_memory: this call could return NULL
erofs-utils-1.8.10/lib/hashmap.c:275:17: call_function: inlined call to 'hashmap_entry_init' from 'memintern'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
erofs-utils-1.8.10/include/erofs/hashmap.h:87:16: warning[-Wanalyzer-malloc-leak]: leak of 'chunkdata'
erofs-utils-1.8.10/lib/blobchunk.c:257:5: enter_function: entry to 'erofs_blob_write_chunked_file'
erofs-utils-1.8.10/lib/blobchunk.c:278:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:280:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:283:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:285:13: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:290:21: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:291:12: branch_false: following 'false' branch (when 'chunkdata' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:294:31: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:296:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:302:22: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:305:23: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:307:42: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:309:20: branch_true: following 'true' branch (when 'offset < 0')...
erofs-utils-1.8.10/lib/blobchunk.c:310:29: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:310:28: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:311:33: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:327:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:345:23: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:347:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:352:25: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:352:25: call_function: calling 'erofs_blob_getchunk' from 'erofs_blob_write_chunked_file'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
erofs-utils-1.8.10/include/erofs/internal.h:486:13: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
erofs-utils-1.8.10/lib/super.c:162:5: enter_function: entry to 'erofs_writesb'
erofs-utils-1.8.10/lib/super.c:195:15: acquire_memory: allocated here
erofs-utils-1.8.10/lib/super.c:196:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
erofs-utils-1.8.10/lib/super.c:201:16: branch_false: ...to here
erofs-utils-1.8.10/lib/super.c:203:15: call_function: inlined call to 'erofs_dev_write' from 'erofs_writesb'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
erofs-utils-1.8.10/include/erofs/internal.h:513:16: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
erofs-utils-1.8.10/lib/data.c:417:14: enter_function: entry to 'erofs_read_metadata_bdi'
erofs-utils-1.8.10/lib/data.c:426:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/data.c:428:15: branch_false: ...to here
erofs-utils-1.8.10/lib/data.c:429:12: branch_false: following 'false' branch (when 'len != 0')...
erofs-utils-1.8.10/lib/data.c:432:18: branch_false: ...to here
erofs-utils-1.8.10/lib/data.c:432:18: acquire_memory: allocated here
erofs-utils-1.8.10/lib/data.c:433:12: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
erofs-utils-1.8.10/lib/data.c:435:17: branch_false: ...to here
erofs-utils-1.8.10/lib/data.c:438:21: branch_true: following 'true' branch (when 'i < len')...
erofs-utils-1.8.10/lib/data.c:439:23: branch_true: ...to here
erofs-utils-1.8.10/lib/data.c:441:23: call_function: inlined call to 'erofs_blk_read' from 'erofs_read_metadata_bdi'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
erofs-utils-1.8.10/lib/blobchunk.c:65:9: warning[-Wanalyzer-malloc-leak]: leak of 'chunkdata'
erofs-utils-1.8.10/lib/blobchunk.c:257:5: enter_function: entry to 'erofs_blob_write_chunked_file'
erofs-utils-1.8.10/lib/blobchunk.c:278:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:280:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:283:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:285:13: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:290:21: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:291:12: branch_false: following 'false' branch (when 'chunkdata' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:294:31: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:296:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:302:22: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:305:23: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:307:42: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:309:20: branch_true: following 'true' branch (when 'offset < 0')...
erofs-utils-1.8.10/lib/blobchunk.c:310:29: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:310:28: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:311:33: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:327:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:345:23: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:347:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:352:25: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:352:25: call_function: calling 'erofs_blob_getchunk' from 'erofs_blob_write_chunked_file'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
erofs-utils-1.8.10/lib/blobchunk.c:66:16: warning[-Wanalyzer-malloc-leak]: leak of 'chunkdata'
erofs-utils-1.8.10/lib/blobchunk.c:257:5: enter_function: entry to 'erofs_blob_write_chunked_file'
erofs-utils-1.8.10/lib/blobchunk.c:278:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:280:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:283:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:285:13: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:290:21: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:291:12: branch_false: following 'false' branch (when 'chunkdata' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:294:31: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:296:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:302:22: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:305:23: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:307:42: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:309:20: branch_true: following 'true' branch (when 'offset < 0')...
erofs-utils-1.8.10/lib/blobchunk.c:310:29: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:310:28: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:311:33: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:327:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:345:23: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:347:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:352:25: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:352:25: call_function: calling 'erofs_blob_getchunk' from 'erofs_blob_write_chunked_file'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
erofs-utils-1.8.10/lib/blobchunk.c:74:25: warning[-Wanalyzer-malloc-leak]: leak of 'chunkdata'
erofs-utils-1.8.10/lib/blobchunk.c:257:5: enter_function: entry to 'erofs_blob_write_chunked_file'
erofs-utils-1.8.10/lib/blobchunk.c:278:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:280:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:283:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:285:13: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:290:21: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:291:12: branch_false: following 'false' branch (when 'chunkdata' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:294:31: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:296:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:302:22: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:305:23: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:307:42: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:309:20: branch_true: following 'true' branch (when 'offset < 0')...
erofs-utils-1.8.10/lib/blobchunk.c:310:29: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:310:28: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:311:33: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:327:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:345:23: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:347:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:352:25: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:352:25: call_function: calling 'erofs_blob_getchunk' from 'erofs_blob_write_chunked_file'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
erofs-utils-1.8.10/lib/blobchunk.c:76:25: warning[-Wanalyzer-malloc-leak]: leak of 'chunkdata'
erofs-utils-1.8.10/lib/blobchunk.c:257:5: enter_function: entry to 'erofs_blob_write_chunked_file'
erofs-utils-1.8.10/lib/blobchunk.c:278:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:280:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:283:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:285:13: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:290:21: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:291:12: branch_false: following 'false' branch (when 'chunkdata' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:294:31: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:296:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:302:22: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:305:23: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:307:42: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:309:20: branch_true: following 'true' branch (when 'offset < 0')...
erofs-utils-1.8.10/lib/blobchunk.c:310:29: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:310:28: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:311:33: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:327:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:345:23: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:347:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:352:25: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:352:25: call_function: calling 'erofs_blob_getchunk' from 'erofs_blob_write_chunked_file'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
erofs-utils-1.8.10/lib/blobchunk.c:97:9: warning[-Wanalyzer-malloc-leak]: leak of 'chunk'
erofs-utils-1.8.10/lib/blobchunk.c:68:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:82:17: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:82:17: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:83:12: branch_false: following 'false' branch (when 'chunk' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:86:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:97:9: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:97:9: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:97:9: throw: if 'erofs_msg' throws an exception...
erofs-utils-1.8.10/lib/blobchunk.c:97:9: danger: 'chunk' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
erofs-utils-1.8.10/lib/blobchunk.c:97:9: warning[-Wanalyzer-malloc-leak]: leak of 'chunkdata'
erofs-utils-1.8.10/lib/blobchunk.c:257:5: enter_function: entry to 'erofs_blob_write_chunked_file'
erofs-utils-1.8.10/lib/blobchunk.c:278:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:280:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:283:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:285:13: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:290:21: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:291:12: branch_false: following 'false' branch (when 'chunkdata' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:294:31: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:296:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:302:22: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:305:23: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:307:42: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:309:20: branch_true: following 'true' branch (when 'offset < 0')...
erofs-utils-1.8.10/lib/blobchunk.c:310:29: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:310:28: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:311:33: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:327:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:345:23: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:347:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:352:25: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:352:25: call_function: calling 'erofs_blob_getchunk' from 'erofs_blob_write_chunked_file'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
erofs-utils-1.8.10/lib/blobchunk.c:99:15: warning[-Wanalyzer-malloc-leak]: leak of 'chunk'
erofs-utils-1.8.10/lib/blobchunk.c:68:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:82:17: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:82:17: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:83:12: branch_false: following 'false' branch (when 'chunk' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:86:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:99:15: throw: if '__erofs_io_write' throws an exception...
erofs-utils-1.8.10/lib/blobchunk.c:99:15: danger: 'chunk' leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
erofs-utils-1.8.10/lib/blobchunk.c:99:15: warning[-Wanalyzer-malloc-leak]: leak of 'chunkdata'
erofs-utils-1.8.10/lib/blobchunk.c:257:5: enter_function: entry to 'erofs_blob_write_chunked_file'
erofs-utils-1.8.10/lib/blobchunk.c:278:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:280:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:283:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:285:13: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:290:21: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:291:12: branch_false: following 'false' branch (when 'chunkdata' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:294:31: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:296:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:302:22: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:305:23: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:307:42: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:309:20: branch_true: following 'true' branch (when 'offset < 0')...
erofs-utils-1.8.10/lib/blobchunk.c:310:29: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:310:28: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:311:33: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:327:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:345:23: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:347:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:352:25: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:352:25: call_function: calling 'erofs_blob_getchunk' from 'erofs_blob_write_chunked_file'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
erofs-utils-1.8.10/lib/blobchunk.c:104:31: warning[-Wanalyzer-malloc-leak]: leak of 'chunk'
erofs-utils-1.8.10/lib/blobchunk.c:68:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:82:17: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:82:17: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:83:12: branch_false: following 'false' branch (when 'chunk' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:86:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:100:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:101:27: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:102:20: branch_true: following 'true' branch (when 'padding != 0')...
erofs-utils-1.8.10/lib/blobchunk.c:103:35: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:104:31: throw: if '__erofs_io_write' throws an exception...
erofs-utils-1.8.10/lib/blobchunk.c:104:31: danger: 'chunk' leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
erofs-utils-1.8.10/lib/blobchunk.c:118:9: warning[-Wanalyzer-malloc-leak]: leak of 'chunk'
erofs-utils-1.8.10/lib/blobchunk.c:55:32: enter_function: entry to 'erofs_blob_getchunk'
erofs-utils-1.8.10/lib/blobchunk.c:68:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:82:17: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:82:17: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:83:12: branch_false: following 'false' branch (when 'chunk' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:86:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:100:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/blobchunk.c:101:27: branch_true: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:112:12: branch_false: following 'false' branch (when 'ret >= 0')...
erofs-utils-1.8.10/lib/blobchunk.c:117:9: call_function: inlined call to 'hashmap_entry_init' from 'erofs_blob_getchunk'
erofs-utils-1.8.10/lib/blobchunk.c:118:9: throw: if 'hashmap_add' throws an exception...
erofs-utils-1.8.10/lib/blobchunk.c:118:9: danger: 'chunk' leaks here; was allocated at [(4)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/3)
Error: GCC_ANALYZER_WARNING (CWE-457): [#def33]
erofs-utils-1.8.10/lib/blobchunk.c:190:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'extent_end'
erofs-utils-1.8.10/lib/blobchunk.c:153:29: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:189:15: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:190:22: danger: use of uninitialized value 'extent_end' here
Error: GCC_ANALYZER_WARNING (CWE-457): [#def34]
erofs-utils-1.8.10/lib/blobchunk.c:221:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
erofs-utils-1.8.10/lib/blobchunk.c:257:5: enter_function: entry to 'erofs_blob_write_chunked_file'
erofs-utils-1.8.10/lib/blobchunk.c:278:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:280:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:283:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:285:13: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:291:12: branch_false: following 'false' branch (when 'chunkdata' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:294:31: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:296:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:302:22: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:305:23: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/blobchunk.c:366:9: call_function: inlined call to 'erofs_update_minextblks' from 'erofs_blob_write_chunked_file'
erofs-utils-1.8.10/lib/blobchunk.c:369:16: call_function: calling 'erofs_blob_mergechunks' from 'erofs_blob_write_chunked_file'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
erofs-utils-1.8.10/lib/blobchunk.c:572:9: warning[-Wanalyzer-malloc-leak]: leak of 'zeros'
erofs-utils-1.8.10/lib/blobchunk.c:568:17: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:569:12: branch_false: following 'false' branch (when 'zeros' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:572:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:572:9: throw: if 'erofs_sha256' throws an exception...
erofs-utils-1.8.10/lib/blobchunk.c:572:9: danger: 'zeros' leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
erofs-utils-1.8.10/lib/blobchunk.c:585:9: warning[-Wanalyzer-malloc-leak]: leak of 'chunk'
erofs-utils-1.8.10/lib/blobchunk.c:569:12: branch_false: following 'false' branch (when 'zeros' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:572:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:575:17: acquire_memory: allocated here
erofs-utils-1.8.10/lib/blobchunk.c:576:12: branch_false: following 'false' branch (when 'chunk' is non-NULL)...
erofs-utils-1.8.10/lib/blobchunk.c:579:9: branch_false: ...to here
erofs-utils-1.8.10/lib/blobchunk.c:585:9: throw: if 'hashmap_add' throws an exception...
erofs-utils-1.8.10/lib/blobchunk.c:585:9: danger: 'chunk' leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
erofs-utils-1.8.10/lib/compress.c:379:9: warning[-Wanalyzer-malloc-leak]: leak of 'sctx.pivot'
erofs-utils-1.8.10/lib/compress.c:1725:5: enter_function: entry to 'erofs_write_compressed_file'
erofs-utils-1.8.10/lib/compress.c:1737:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress.c:1742:14: branch_false: ...to here
erofs-utils-1.8.10/lib/compress.c:1743:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress.c:1747:18: branch_false: ...to here
erofs-utils-1.8.10/lib/compress.c:1761:15: call_function: calling 'z_erofs_compress_segment' from 'erofs_write_compressed_file'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
erofs-utils-1.8.10/lib/compress.c:1675:30: warning[-Wanalyzer-malloc-leak]: leak of 'ictx'
erofs-utils-1.8.10/lib/compress.c:1627:7: enter_function: entry to 'erofs_begin_compressed_file'
erofs-utils-1.8.10/lib/compress.c:1654:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress.c:1654:13: branch_true: ...to here
erofs-utils-1.8.10/lib/compress.c:1654:13: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress.c:1664:24: branch_false: ...to here
erofs-utils-1.8.10/lib/compress.c:1664:24: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compress.c:1665:20: branch_false: following 'false' branch (when 'ictx' is non-NULL)...
erofs-utils-1.8.10/lib/compress.c:1668:9: branch_false: ...to here
erofs-utils-1.8.10/lib/compress.c:1674:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress.c:1674:33: call_function: inlined call to 'erofs_is_packed_inode' from 'erofs_begin_compressed_file'
erofs-utils-1.8.10/lib/compress.c:1675:30: throw: if 'z_erofs_fragments_tofh' throws an exception...
erofs-utils-1.8.10/lib/compress.c:1675:30: danger: 'ictx' leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
erofs-utils-1.8.10/lib/compress_hints.c:34:15: warning[-Wanalyzer-malloc-leak]: leak of 'ch'
erofs-utils-1.8.10/lib/compress_hints.c:30:14: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compress_hints.c:31:12: branch_false: following 'false' branch (when 'ch' is non-NULL)...
erofs-utils-1.8.10/lib/compress_hints.c:34:23: branch_false: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:34:15: throw: if 'regcomp' throws an exception...
erofs-utils-1.8.10/lib/compress_hints.c:34:15: danger: 'ch' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
erofs-utils-1.8.10/lib/compress_hints.c:107:21: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(cfg.c_compress_hints_file, "r")'
erofs-utils-1.8.10/lib/compress_hints.c:96:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress_hints.c:99:13: branch_false: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:99:13: acquire_resource: opened here
erofs-utils-1.8.10/lib/compress_hints.c:100:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress_hints.c:100:12: branch_false: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:103:24: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress_hints.c:107:21: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:113:20: branch_true: following 'true' branch (when 'pattern' is NULL)...
erofs-utils-1.8.10/lib/compress_hints.c:117:20: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:117:20: branch_true: following 'true' branch (when 'alg' is NULL)...
erofs-utils-1.8.10/lib/compress_hints.c:118:25: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:118:25: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress_hints.c:118:25: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:118:25: throw: if 'erofs_msg' throws an exception...
erofs-utils-1.8.10/lib/compress_hints.c:107:21: danger: 'fopen(cfg.c_compress_hints_file, "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
erofs-utils-1.8.10/lib/compress_hints.c:107:21: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(cfg.c_compress_hints_file, "r")'
erofs-utils-1.8.10/lib/compress_hints.c:96:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress_hints.c:99:13: branch_false: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:99:13: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compress_hints.c:100:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress_hints.c:100:12: branch_false: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:103:24: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress_hints.c:107:21: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:113:20: branch_true: following 'true' branch (when 'pattern' is NULL)...
erofs-utils-1.8.10/lib/compress_hints.c:117:20: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:117:20: branch_true: following 'true' branch (when 'alg' is NULL)...
erofs-utils-1.8.10/lib/compress_hints.c:118:25: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:118:25: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress_hints.c:118:25: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:118:25: throw: if 'erofs_msg' throws an exception...
erofs-utils-1.8.10/lib/compress_hints.c:107:21: danger: 'fopen(cfg.c_compress_hints_file, "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
erofs-utils-1.8.10/lib/compress_hints.c:149:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(cfg.c_compress_hints_file, "r")'
erofs-utils-1.8.10/lib/compress_hints.c:96:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress_hints.c:99:13: branch_false: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:99:13: acquire_resource: opened here
erofs-utils-1.8.10/lib/compress_hints.c:100:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress_hints.c:100:12: branch_false: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:149:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress_hints.c:150:17: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:151:17: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress_hints.c:151:17: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:151:17: throw: if 'erofs_msg' throws an exception...
erofs-utils-1.8.10/lib/compress_hints.c:149:13: danger: 'fopen(cfg.c_compress_hints_file, "r")' leaks here; was opened at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
erofs-utils-1.8.10/lib/compress_hints.c:149:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(cfg.c_compress_hints_file, "r")'
erofs-utils-1.8.10/lib/compress_hints.c:96:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress_hints.c:99:13: branch_false: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:99:13: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compress_hints.c:100:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compress_hints.c:100:12: branch_false: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:149:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress_hints.c:150:17: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:151:17: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compress_hints.c:151:17: branch_true: ...to here
erofs-utils-1.8.10/lib/compress_hints.c:151:17: throw: if 'erofs_msg' throws an exception...
erofs-utils-1.8.10/lib/compress_hints.c:149:13: danger: 'fopen(cfg.c_compress_hints_file, "r")' leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
erofs-utils-1.8.10/lib/compressor_libdeflate.c:113:21: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
erofs-utils-1.8.10/lib/compressor_libdeflate.c:110:15: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compressor_libdeflate.c:111:12: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
erofs-utils-1.8.10/lib/compressor_libdeflate.c:113:49: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libdeflate.c:113:21: throw: if 'libdeflate_alloc_compressor' throws an exception...
erofs-utils-1.8.10/lib/compressor_libdeflate.c:113:21: danger: 'ctx' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: CPPCHECK_WARNING (CWE-401): [#def45]
erofs-utils-1.8.10/lib/compressor_liblzma.c:110: error[memleak]: Memory leak: ctx
Error: CPPCHECK_WARNING (CWE-758): [#def46]
erofs-utils-1.8.10/lib/compressor_libzstd.c:109: error[shiftTooManyBits]: Shifting 32-bit value by 63 bits is undefined behaviour
Error: CPPCHECK_WARNING (CWE-758): [#def47]
erofs-utils-1.8.10/lib/compressor_libzstd.c:112: error[shiftTooManyBits]: Shifting 32-bit value by 63 bits is undefined behaviour
Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
erofs-utils-1.8.10/lib/compressor_libzstd.c:129:12: branch_false: following 'false' branch (when 'ctx' is NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compressor_libzstd.c:135:20: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: throw: if 'ZSTD_createCCtx' throws an exception...
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: danger: 'ctx' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
erofs-utils-1.8.10/lib/compressor_libzstd.c:145:19: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
erofs-utils-1.8.10/lib/compressor_libzstd.c:129:12: branch_false: following 'false' branch (when 'ctx' is NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compressor_libzstd.c:135:20: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:139:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:145:73: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:145:19: throw: if 'ZSTD_CCtx_setParameter' throws an exception...
erofs-utils-1.8.10/lib/compressor_libzstd.c:145:19: danger: 'ctx' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
erofs-utils-1.8.10/lib/compressor_libzstd.c:146:13: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
erofs-utils-1.8.10/lib/compressor_libzstd.c:129:12: branch_false: following 'false' branch (when 'ctx' is NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compressor_libzstd.c:135:20: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:139:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:145:73: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:146:13: throw: if 'ZSTD_isError' throws an exception...
erofs-utils-1.8.10/lib/compressor_libzstd.c:146:13: danger: 'ctx' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
erofs-utils-1.8.10/lib/compressor_libzstd.c:147:17: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
erofs-utils-1.8.10/lib/compressor_libzstd.c:129:12: branch_false: following 'false' branch (when 'ctx' is NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compressor_libzstd.c:135:20: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:139:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:145:73: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:146:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:147:17: branch_true: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:147:17: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:147:17: branch_true: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:147:17: throw: if 'ZSTD_getErrorName' throws an exception...
erofs-utils-1.8.10/lib/compressor_libzstd.c:147:17: danger: 'ctx' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
erofs-utils-1.8.10/lib/compressor_libzstd.c:151:19: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
erofs-utils-1.8.10/lib/compressor_libzstd.c:129:12: branch_false: following 'false' branch (when 'ctx' is NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compressor_libzstd.c:135:20: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:139:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:145:73: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:146:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:151:66: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:151:19: throw: if 'ZSTD_CCtx_setParameter' throws an exception...
erofs-utils-1.8.10/lib/compressor_libzstd.c:151:19: danger: 'ctx' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
erofs-utils-1.8.10/lib/compressor_libzstd.c:152:13: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
erofs-utils-1.8.10/lib/compressor_libzstd.c:129:12: branch_false: following 'false' branch (when 'ctx' is NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compressor_libzstd.c:135:20: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:139:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:145:73: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:146:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:151:66: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:152:13: throw: if 'ZSTD_isError' throws an exception...
erofs-utils-1.8.10/lib/compressor_libzstd.c:152:13: danger: 'ctx' leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
erofs-utils-1.8.10/lib/compressor_libzstd.c:153:17: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
erofs-utils-1.8.10/lib/compressor_libzstd.c:129:12: branch_false: following 'false' branch (when 'ctx' is NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compressor_libzstd.c:135:20: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:139:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:145:73: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:146:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:151:66: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:152:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:153:17: branch_true: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:153:17: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/compressor_libzstd.c:153:17: branch_true: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:153:17: throw: if 'ZSTD_getErrorName' throws an exception...
erofs-utils-1.8.10/lib/compressor_libzstd.c:153:17: danger: 'ctx' leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
erofs-utils-1.8.10/lib/compressor_libzstd.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
erofs-utils-1.8.10/lib/compressor_libzstd.c:129:12: branch_false: following 'false' branch (when 'ctx' is NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:134:23: acquire_memory: allocated here
erofs-utils-1.8.10/lib/compressor_libzstd.c:135:20: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
erofs-utils-1.8.10/lib/compressor_libzstd.c:138:16: branch_false: ...to here
erofs-utils-1.8.10/lib/compressor_libzstd.c:166:9: throw: if 'ZSTD_freeCCtx' throws an exception...
erofs-utils-1.8.10/lib/compressor_libzstd.c:166:9: danger: 'ctx' leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def56]
erofs-utils-1.8.10/lib/config.c:142:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 's'
erofs-utils-1.8.10/lib/config.c:119:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/config.c:125:20: branch_true: ...to here
erofs-utils-1.8.10/lib/config.c:133:12: branch_false: following 'false' branch (when 'col > placeholder')...
erofs-utils-1.8.10/lib/config.c:136:15: branch_false: ...to here
erofs-utils-1.8.10/lib/config.c:138:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/config.c:139:44: branch_true: ...to here
erofs-utils-1.8.10/lib/config.c:139:27: acquire_memory: this call could return NULL
erofs-utils-1.8.10/lib/config.c:141:20: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/config.c:142:25: branch_true: ...to here
erofs-utils-1.8.10/lib/config.c:142:25: danger: 's' could be NULL: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
erofs-utils-1.8.10/lib/decompress.c:59:15: warning[-Wanalyzer-malloc-leak]: leak of 'dest'
erofs-utils-1.8.10/lib/decompress.c:39:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:44:42: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:45:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:52:13: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:53:24: acquire_memory: allocated here
erofs-utils-1.8.10/lib/decompress.c:54:20: branch_false: following 'false' branch (when 'buff' is non-NULL)...
erofs-utils-1.8.10/lib/decompress.c:60:50: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:59:15: throw: if 'ZSTD_decompress' throws an exception...
erofs-utils-1.8.10/lib/decompress.c:59:15: danger: 'dest' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: COMPILER_WARNING (CWE-681): [#def58]
erofs-utils-1.8.10/lib/decompress.c: scope_hint: In function 'z_erofs_qpl_get_job'
erofs-utils-1.8.10/lib/decompress.c:139:59: warning[-Wpointer-sign]: pointer targets in passing argument 2 of 'qpl_get_job_size' differ in signedness
/usr/include/qpl/qpl.h:22: included_from: Included from here.
erofs-utils-1.8.10/lib/decompress.c:84: included_from: Included from here.
/usr/include/qpl/c_api/job.h:161:1: note: expected 'uint32_t *' {aka 'unsigned int *'} but argument is of type 'int32_t *' {aka 'int *'}
Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
erofs-utils-1.8.10/lib/decompress.c:149:26: warning[-Wanalyzer-malloc-leak]: leak of 'job'
erofs-utils-1.8.10/lib/decompress.c:138:12: branch_true: following 'true' branch (when 'job' is NULL)...
erofs-utils-1.8.10/lib/decompress.c:139:26: branch_true: ...to here
erofs-utils-1.8.10/lib/decompress.c:140:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:145:23: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:145:23: acquire_memory: allocated here
erofs-utils-1.8.10/lib/decompress.c:146:20: branch_false: following 'false' branch (when 'job' is non-NULL)...
erofs-utils-1.8.10/lib/decompress.c:149:66: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:149:26: throw: if 'qpl_init_job' throws an exception...
erofs-utils-1.8.10/lib/decompress.c:149:26: danger: 'job' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
erofs-utils-1.8.10/lib/decompress.c:267:15: warning[-Wanalyzer-malloc-leak]: leak of 'dest'
erofs-utils-1.8.10/lib/decompress.c:256:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:259:27: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:261:24: acquire_memory: allocated here
erofs-utils-1.8.10/lib/decompress.c:262:20: branch_false: following 'false' branch (when 'buff' is non-NULL)...
erofs-utils-1.8.10/lib/decompress.c:267:15: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:267:15: throw: if 'libdeflate_alloc_decompressor' throws an exception...
erofs-utils-1.8.10/lib/decompress.c:267:15: danger: 'dest' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
erofs-utils-1.8.10/lib/decompress.c:275:31: warning[-Wanalyzer-malloc-leak]: leak of 'dest'
erofs-utils-1.8.10/lib/decompress.c:256:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:259:27: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:261:24: acquire_memory: allocated here
erofs-utils-1.8.10/lib/decompress.c:262:20: branch_false: following 'false' branch (when 'buff' is non-NULL)...
erofs-utils-1.8.10/lib/decompress.c:267:15: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:268:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:273:13: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:273:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/decompress.c:273:12: branch_true: ...to here
erofs-utils-1.8.10/lib/decompress.c:275:31: throw: if 'libdeflate_deflate_decompress' throws an exception...
erofs-utils-1.8.10/lib/decompress.c:275:31: danger: 'dest' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
erofs-utils-1.8.10/lib/decompress.c:298:23: warning[-Wanalyzer-malloc-leak]: leak of 'dest'
erofs-utils-1.8.10/lib/decompress.c:256:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:259:27: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:261:24: acquire_memory: allocated here
erofs-utils-1.8.10/lib/decompress.c:262:20: branch_false: following 'false' branch (when 'buff' is non-NULL)...
erofs-utils-1.8.10/lib/decompress.c:267:15: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:268:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:273:13: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:273:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:300:33: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:298:23: throw: if 'libdeflate_deflate_decompress' throws an exception...
erofs-utils-1.8.10/lib/decompress.c:298:23: danger: 'dest' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
erofs-utils-1.8.10/lib/decompress.c:482:23: warning[-Wanalyzer-malloc-leak]: leak of 'dest'
erofs-utils-1.8.10/lib/decompress.c:474:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/decompress.c:475:31: branch_true: ...to here
erofs-utils-1.8.10/lib/decompress.c:475:24: acquire_memory: allocated here
erofs-utils-1.8.10/lib/decompress.c:476:20: branch_false: following 'false' branch (when 'buff' is non-NULL)...
erofs-utils-1.8.10/lib/decompress.c:481:13: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:482:23: throw: if 'LZ4_decompress_safe_partial' throws an exception...
erofs-utils-1.8.10/lib/decompress.c:482:23: danger: 'dest' leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
erofs-utils-1.8.10/lib/decompress.c:486:23: warning[-Wanalyzer-malloc-leak]: leak of 'dest'
erofs-utils-1.8.10/lib/decompress.c:470:20: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:474:13: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:474:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/decompress.c:475:31: branch_true: ...to here
erofs-utils-1.8.10/lib/decompress.c:475:24: acquire_memory: allocated here
erofs-utils-1.8.10/lib/decompress.c:476:20: branch_false: following 'false' branch (when 'buff' is non-NULL)...
erofs-utils-1.8.10/lib/decompress.c:481:13: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:481:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/decompress.c:481:13: branch_false: ...to here
erofs-utils-1.8.10/lib/decompress.c:481:13: branch_true: following 'true' branch (when 'support_0padding != 0')...
erofs-utils-1.8.10/lib/decompress.c:488:43: branch_true: ...to here
erofs-utils-1.8.10/lib/decompress.c:486:23: throw: if 'LZ4_decompress_safe' throws an exception...
erofs-utils-1.8.10/lib/decompress.c:486:23: danger: 'dest' leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
erofs-utils-1.8.10/lib/dedupe.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of 'di'
erofs-utils-1.8.10/lib/dedupe.c:158:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/dedupe.c:161:14: acquire_memory: allocated here
erofs-utils-1.8.10/lib/dedupe.c:162:12: branch_false: following 'false' branch (when 'di' is non-NULL)...
erofs-utils-1.8.10/lib/dedupe.c:165:31: branch_false: ...to here
erofs-utils-1.8.10/lib/dedupe.c:166:9: throw: if 'erofs_sha256' throws an exception...
erofs-utils-1.8.10/lib/dedupe.c:166:9: danger: 'di' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
erofs-utils-1.8.10/lib/dedupe_ext.c:55:31: warning[-Wanalyzer-malloc-leak]: leak of 'memb'
erofs-utils-1.8.10/lib/dedupe_ext.c:47:9: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/dedupe_ext.c:48:21: branch_true: ...to here
erofs-utils-1.8.10/lib/dedupe_ext.c:48:20: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/dedupe_ext.c:50:28: branch_true: following 'true' branch (when 'memb' is NULL)...
erofs-utils-1.8.10/lib/dedupe_ext.c:51:40: branch_true: ...to here
erofs-utils-1.8.10/lib/dedupe_ext.c:51:40: acquire_memory: allocated here
erofs-utils-1.8.10/lib/dedupe_ext.c:52:36: branch_false: following 'false' branch (when 'memb' is non-NULL)...
erofs-utils-1.8.10/lib/dedupe_ext.c:55:60: branch_false: ...to here
erofs-utils-1.8.10/lib/dedupe_ext.c:55:31: throw: if 'erofs_dev_read' throws an exception...
erofs-utils-1.8.10/lib/dedupe_ext.c:55:31: danger: 'memb' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
Error: CPPCHECK_WARNING (CWE-457): [#def67]
erofs-utils-1.8.10/lib/dir.c:168: error[uninitvar]: Uninitialized variable: de->nameoff
Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
erofs-utils-1.8.10/lib/exclude.c:46:23: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
erofs-utils-1.8.10/lib/exclude.c:36:12: branch_false: following 'false' branch (when 'r' is non-NULL)...
erofs-utils-1.8.10/lib/exclude.c:39:22: branch_false: ...to here
erofs-utils-1.8.10/lib/exclude.c:39:22: acquire_memory: allocated here
erofs-utils-1.8.10/lib/exclude.c:40:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/exclude.c:45:12: branch_false: ...to here
erofs-utils-1.8.10/lib/exclude.c:45:12: branch_true: following 'true' branch (when 'is_regex != 0')...
erofs-utils-1.8.10/lib/exclude.c:46:31: branch_true: ...to here
erofs-utils-1.8.10/lib/exclude.c:46:23: throw: if 'regcomp' throws an exception...
erofs-utils-1.8.10/lib/exclude.c:46:23: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
erofs-utils-1.8.10/lib/exclude.c:46:23: warning[-Wanalyzer-malloc-leak]: leak of 'r'
erofs-utils-1.8.10/lib/exclude.c:34:13: acquire_memory: allocated here
erofs-utils-1.8.10/lib/exclude.c:36:12: branch_false: following 'false' branch (when 'r' is non-NULL)...
erofs-utils-1.8.10/lib/exclude.c:39:22: branch_false: ...to here
erofs-utils-1.8.10/lib/exclude.c:40:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/exclude.c:45:12: branch_false: ...to here
erofs-utils-1.8.10/lib/exclude.c:45:12: branch_true: following 'true' branch (when 'is_regex != 0')...
erofs-utils-1.8.10/lib/exclude.c:46:31: branch_true: ...to here
erofs-utils-1.8.10/lib/exclude.c:46:23: throw: if 'regcomp' throws an exception...
erofs-utils-1.8.10/lib/exclude.c:46:23: danger: 'r' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
erofs-utils-1.8.10/lib/fragments.c:138:15: warning[-Wanalyzer-malloc-leak]: leak of 'data'
erofs-utils-1.8.10/lib/fragments.c:128:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/fragments.c:130:13: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:130:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/fragments.c:133:14: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:134:16: acquire_memory: allocated here
erofs-utils-1.8.10/lib/fragments.c:135:12: branch_false: following 'false' branch (when 'data' is non-NULL)...
erofs-utils-1.8.10/lib/fragments.c:138:35: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:138:15: throw: if 'pread' throws an exception...
erofs-utils-1.8.10/lib/fragments.c:138:15: danger: 'data' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
erofs-utils-1.8.10/lib/fragments.c:282:22: warning[-Wanalyzer-malloc-leak]: leak of 'memblock'
erofs-utils-1.8.10/lib/fragments.c:238:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/fragments.c:241:18: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:242:12: branch_false: following 'false' branch (when 'offset >= 0')...
erofs-utils-1.8.10/lib/fragments.c:245:31: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:246:12: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/fragments.c:247:29: branch_true: ...to here
erofs-utils-1.8.10/lib/fragments.c:275:28: acquire_memory: allocated here
erofs-utils-1.8.10/lib/fragments.c:276:20: branch_false: following 'false' branch (when 'memblock' is non-NULL)...
erofs-utils-1.8.10/lib/fragments.c:282:51: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:282:22: throw: if 'pread' throws an exception...
erofs-utils-1.8.10/lib/fragments.c:282:22: danger: 'memblock' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
erofs-utils-1.8.10/lib/fragments.c:538:15: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
erofs-utils-1.8.10/lib/fragments.c:518:12: branch_false: following 'false' branch (when 'err == 0')...
erofs-utils-1.8.10/lib/fragments.c:521:9: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:523:12: branch_false: following 'false' branch (when 'err == 0')...
erofs-utils-1.8.10/lib/fragments.c:526:15: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:527:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/fragments.c:532:29: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:534:18: acquire_memory: allocated here
erofs-utils-1.8.10/lib/fragments.c:535:12: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
erofs-utils-1.8.10/lib/fragments.c:538:15: branch_false: ...to here
erofs-utils-1.8.10/lib/fragments.c:538:15: throw: if 'erofs_pread' throws an exception...
erofs-utils-1.8.10/lib/fragments.c:538:15: danger: 'buffer' leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-835): [#def73]
erofs-utils-1.8.10/lib/inode.c:140:9: warning[-Wanalyzer-infinite-loop]: infinite loop
Error: GCC_ANALYZER_WARNING (CWE-415): [#def74]
erofs-utils-1.8.10/lib/inode.c:141:17: warning[-Wanalyzer-double-free]: double-'free' of 'd'
erofs-utils-1.8.10/lib/inode.c:1844:12: enter_function: entry to 'erofs_mkfs_build_tree'
erofs-utils-1.8.10/lib/inode.c:1852:12: branch_false: following 'false' branch (when 'q' is non-NULL)...
erofs-utils-1.8.10/lib/inode.c:1855:13: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1864:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:1868:9: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1876:12: branch_false: following 'false' branch (when 'err == 0')...
erofs-utils-1.8.10/lib/inode.c:1879:15: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1879:15: call_function: calling '__erofs_mkfs_build_tree' from 'erofs_mkfs_build_tree'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
erofs-utils-1.8.10/lib/inode.c:162:28: warning[-Wanalyzer-malloc-leak]: leak of 'erofs_d_alloc(dir, ".")'
erofs-utils-1.8.10/lib/inode.c:2041:21: enter_function: entry to 'erofs_rebuild_make_root'
erofs-utils-1.8.10/lib/inode.c:2045:16: call_function: calling 'erofs_new_inode' from 'erofs_rebuild_make_root'
erofs-utils-1.8.10/lib/inode.c:2045:16: return_function: returning to 'erofs_rebuild_make_root' from 'erofs_new_inode'
erofs-utils-1.8.10/lib/inode.c:2046:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:2048:27: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:2053:9: call_function: calling 'erofs_init_empty_dir' from 'erofs_rebuild_make_root'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
erofs-utils-1.8.10/lib/inode.c:236:24: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
erofs-utils-1.8.10/lib/inode.c:2041:21: enter_function: entry to 'erofs_rebuild_make_root'
erofs-utils-1.8.10/lib/inode.c:2045:16: call_function: calling 'erofs_new_inode' from 'erofs_rebuild_make_root'
erofs-utils-1.8.10/lib/inode.c:2045:16: return_function: returning to 'erofs_rebuild_make_root' from 'erofs_new_inode'
erofs-utils-1.8.10/lib/inode.c:2046:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:2048:27: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:2053:9: call_function: calling 'erofs_init_empty_dir' from 'erofs_rebuild_make_root'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
erofs-utils-1.8.10/lib/inode.c:243:24: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
erofs-utils-1.8.10/lib/inode.c:2041:21: enter_function: entry to 'erofs_rebuild_make_root'
erofs-utils-1.8.10/lib/inode.c:2045:16: call_function: calling 'erofs_new_inode' from 'erofs_rebuild_make_root'
erofs-utils-1.8.10/lib/inode.c:2045:16: return_function: returning to 'erofs_rebuild_make_root' from 'erofs_new_inode'
erofs-utils-1.8.10/lib/inode.c:2046:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:2048:27: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:2053:9: call_function: calling 'erofs_init_empty_dir' from 'erofs_rebuild_make_root'
Error: CPPCHECK_WARNING (CWE-457): [#def78]
erofs-utils-1.8.10/lib/inode.c:394: error[uninitvar]: Uninitialized variable: de->nameoff
Error: GCC_ANALYZER_WARNING (CWE-775): [#def79]
erofs-utils-1.8.10/lib/inode.c:524:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ctx.fd'
erofs-utils-1.8.10/lib/inode.c:1844:12: enter_function: entry to 'erofs_mkfs_build_tree'
erofs-utils-1.8.10/lib/inode.c:1852:12: branch_false: following 'false' branch (when 'q' is non-NULL)...
erofs-utils-1.8.10/lib/inode.c:1855:13: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1864:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:1868:9: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1876:12: branch_false: following 'false' branch (when 'err == 0')...
erofs-utils-1.8.10/lib/inode.c:1879:15: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1879:15: call_function: calling '__erofs_mkfs_build_tree' from 'erofs_mkfs_build_tree'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
erofs-utils-1.8.10/lib/inode.c:1073:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
erofs-utils-1.8.10/lib/inode.c:1926:21: enter_function: entry to 'erofs_mkfs_build_special_from_fd'
erofs-utils-1.8.10/lib/inode.c:1935:12: branch_false: following 'false' branch (when 'ret >= 0')...
erofs-utils-1.8.10/lib/inode.c:1938:15: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1939:12: branch_false: following 'false' branch (when 'ret == 0')...
erofs-utils-1.8.10/lib/inode.c:1942:17: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1942:17: call_function: calling 'erofs_new_inode' from 'erofs_mkfs_build_special_from_fd'
erofs-utils-1.8.10/lib/inode.c:1942:17: return_function: returning to 'erofs_mkfs_build_special_from_fd' from 'erofs_new_inode'
erofs-utils-1.8.10/lib/inode.c:1943:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:1946:13: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1951:15: call_function: calling 'erofs_fill_inode' from 'erofs_mkfs_build_special_from_fd'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
erofs-utils-1.8.10/lib/inode.c:1101:22: warning[-Wanalyzer-malloc-leak]: leak of 'erofs_new_inode(sbi)'
erofs-utils-1.8.10/lib/inode.c:1926:21: enter_function: entry to 'erofs_mkfs_build_special_from_fd'
erofs-utils-1.8.10/lib/inode.c:1935:12: branch_false: following 'false' branch (when 'ret >= 0')...
erofs-utils-1.8.10/lib/inode.c:1938:15: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1939:12: branch_false: following 'false' branch (when 'ret == 0')...
erofs-utils-1.8.10/lib/inode.c:1942:17: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1942:17: call_function: calling 'erofs_new_inode' from 'erofs_mkfs_build_special_from_fd'
erofs-utils-1.8.10/lib/inode.c:1942:17: return_function: returning to 'erofs_mkfs_build_special_from_fd' from 'erofs_new_inode'
erofs-utils-1.8.10/lib/inode.c:1943:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:1946:13: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1946:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:1951:15: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1951:15: call_function: calling 'erofs_fill_inode' from 'erofs_mkfs_build_special_from_fd'
Error: GCC_ANALYZER_WARNING (CWE-775): [#def82]
erofs-utils-1.8.10/lib/inode.c:1392:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ctx.fd'
erofs-utils-1.8.10/lib/inode.c:1844:12: enter_function: entry to 'erofs_mkfs_build_tree'
erofs-utils-1.8.10/lib/inode.c:1852:12: branch_false: following 'false' branch (when 'q' is non-NULL)...
erofs-utils-1.8.10/lib/inode.c:1855:13: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1864:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:1868:9: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1876:12: branch_false: following 'false' branch (when 'err == 0')...
erofs-utils-1.8.10/lib/inode.c:1879:15: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1879:15: call_function: calling '__erofs_mkfs_build_tree' from 'erofs_mkfs_build_tree'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
erofs-utils-1.8.10/lib/inode.c:1447:22: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(*dir.i_srcpath)'
erofs-utils-1.8.10/lib/inode.c:1844:12: enter_function: entry to 'erofs_mkfs_build_tree'
erofs-utils-1.8.10/lib/inode.c:1852:12: branch_false: following 'false' branch (when 'q' is non-NULL)...
erofs-utils-1.8.10/lib/inode.c:1855:13: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1864:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:1868:9: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1876:12: branch_false: following 'false' branch (when 'err == 0')...
erofs-utils-1.8.10/lib/inode.c:1879:15: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1879:15: call_function: calling '__erofs_mkfs_build_tree' from 'erofs_mkfs_build_tree'
Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
erofs-utils-1.8.10/lib/inode.c:1609:44: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ctx.fd'
erofs-utils-1.8.10/lib/inode.c:1844:12: enter_function: entry to 'erofs_mkfs_build_tree'
erofs-utils-1.8.10/lib/inode.c:1852:12: branch_false: following 'false' branch (when 'q' is non-NULL)...
erofs-utils-1.8.10/lib/inode.c:1855:13: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1864:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:1868:9: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1876:12: branch_false: following 'false' branch (when 'err == 0')...
erofs-utils-1.8.10/lib/inode.c:1879:15: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1879:15: call_function: calling '__erofs_mkfs_build_tree' from 'erofs_mkfs_build_tree'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
erofs-utils-1.8.10/lib/inode.c:1861:9: warning[-Wanalyzer-malloc-leak]: leak of 'q'
erofs-utils-1.8.10/lib/inode.c:1851:13: acquire_memory: allocated here
erofs-utils-1.8.10/lib/inode.c:1852:12: branch_false: following 'false' branch (when 'q' is non-NULL)...
erofs-utils-1.8.10/lib/inode.c:1855:13: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1861:9: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/inode.c:1861:9: branch_true: ...to here
erofs-utils-1.8.10/lib/inode.c:1861:9: throw: if 'erofs_msg' throws an exception...
erofs-utils-1.8.10/lib/inode.c:1861:9: danger: 'q' leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
erofs-utils-1.8.10/lib/inode.c:2034:15: warning[-Wanalyzer-malloc-leak]: leak of 'ibuf'
erofs-utils-1.8.10/lib/inode.c:1988:5: enter_function: entry to 'erofs_fixup_root_inode'
erofs-utils-1.8.10/lib/inode.c:1996:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:1999:12: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:1999:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:2004:9: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:2006:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:2012:13: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:2012:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/inode.c:2016:27: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:2025:12: branch_false: following 'false' branch (when 'ondisk_capacity >= ondisk_size')...
erofs-utils-1.8.10/lib/inode.c:2031:16: branch_false: ...to here
erofs-utils-1.8.10/lib/inode.c:2031:16: acquire_memory: allocated here
erofs-utils-1.8.10/lib/inode.c:2032:12: branch_false: following 'false' branch (when 'ibuf' is non-NULL)...
erofs-utils-1.8.10/lib/inode.c:2034:44: call_function: inlined call to 'erofs_iloc' from 'erofs_fixup_root_inode'
erofs-utils-1.8.10/lib/inode.c:2034:15: throw: if 'erofs_dev_read' throws an exception...
erofs-utils-1.8.10/lib/inode.c:2034:15: danger: 'ibuf' leaks here; was allocated at [(12)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/11)
Error: CPPCHECK_WARNING (CWE-457): [#def87]
erofs-utils-1.8.10/lib/namei.c:195: error[uninitvar]: Uninitialized variable: de->nameoff
Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
erofs-utils-1.8.10/lib/rebuild.c:446:15: warning[-Wanalyzer-malloc-leak]: leak of 'inode.i_srcpath'
erofs-utils-1.8.10/lib/rebuild.c:426:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/rebuild.c:431:21: branch_false: ...to here
erofs-utils-1.8.10/lib/rebuild.c:434:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/rebuild.c:438:27: branch_false: ...to here
erofs-utils-1.8.10/lib/rebuild.c:438:27: acquire_memory: allocated here
erofs-utils-1.8.10/lib/rebuild.c:446:15: throw: if 'erofs_iterate_dir' throws an exception...
erofs-utils-1.8.10/lib/rebuild.c:446:15: danger: 'inode.i_srcpath' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def89]
erofs-utils-1.8.10/lib/rebuild.c:474:13: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
erofs-utils-1.8.10/lib/rebuild.c:451:12: enter_function: entry to 'erofs_rebuild_basedir_dirent_iter'
erofs-utils-1.8.10/lib/rebuild.c:461:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/rebuild.c:464:37: branch_false: ...to here
erofs-utils-1.8.10/lib/rebuild.c:465:12: branch_false: following 'false' branch (when 'dname' is non-NULL)...
erofs-utils-1.8.10/lib/rebuild.c:467:13: branch_false: ...to here
erofs-utils-1.8.10/lib/rebuild.c:467:13: call_function: calling 'erofs_rebuild_get_dentry' from 'erofs_rebuild_basedir_dirent_iter'
erofs-utils-1.8.10/lib/rebuild.c:467:13: return_function: returning to 'erofs_rebuild_basedir_dirent_iter' from 'erofs_rebuild_get_dentry'
erofs-utils-1.8.10/lib/rebuild.c:469:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/rebuild.c:474:13: branch_false: ...to here
erofs-utils-1.8.10/lib/rebuild.c:474:13: danger: dereference of NULL 'erofs_rebuild_get_dentry(mergedir, dname, 0, & dumb, & dumb, 0)'
Error: CPPCHECK_WARNING (CWE-758): [#def90]
erofs-utils-1.8.10/lib/super.c:50: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour
Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
erofs-utils-1.8.10/lib/tar.c:157:31: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
erofs-utils-1.8.10/lib/tar.c:483:5: enter_function: entry to 'tarerofs_parse_pax_header'
erofs-utils-1.8.10/lib/tar.c:489:15: acquire_memory: allocated here
erofs-utils-1.8.10/lib/tar.c:490:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
erofs-utils-1.8.10/lib/tar.c:494:15: branch_false: ...to here
erofs-utils-1.8.10/lib/tar.c:494:15: call_function: calling 'erofs_iostream_bread' from 'tarerofs_parse_pax_header'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
erofs-utils-1.8.10/lib/tar.c:163:42: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
erofs-utils-1.8.10/lib/tar.c:483:5: enter_function: entry to 'tarerofs_parse_pax_header'
erofs-utils-1.8.10/lib/tar.c:489:15: acquire_memory: allocated here
erofs-utils-1.8.10/lib/tar.c:490:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
erofs-utils-1.8.10/lib/tar.c:494:15: branch_false: ...to here
erofs-utils-1.8.10/lib/tar.c:494:15: call_function: calling 'erofs_iostream_bread' from 'tarerofs_parse_pax_header'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
erofs-utils-1.8.10/lib/tar.c:165:41: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
erofs-utils-1.8.10/lib/tar.c:483:5: enter_function: entry to 'tarerofs_parse_pax_header'
erofs-utils-1.8.10/lib/tar.c:489:15: acquire_memory: allocated here
erofs-utils-1.8.10/lib/tar.c:490:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
erofs-utils-1.8.10/lib/tar.c:494:15: branch_false: ...to here
erofs-utils-1.8.10/lib/tar.c:494:15: call_function: calling 'erofs_iostream_bread' from 'tarerofs_parse_pax_header'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
erofs-utils-1.8.10/lib/tar.c:206:31: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
erofs-utils-1.8.10/lib/tar.c:483:5: enter_function: entry to 'tarerofs_parse_pax_header'
erofs-utils-1.8.10/lib/tar.c:489:15: acquire_memory: allocated here
erofs-utils-1.8.10/lib/tar.c:490:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
erofs-utils-1.8.10/lib/tar.c:494:15: branch_false: ...to here
erofs-utils-1.8.10/lib/tar.c:494:15: call_function: calling 'erofs_iostream_bread' from 'tarerofs_parse_pax_header'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
erofs-utils-1.8.10/lib/tar.c:215:29: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
erofs-utils-1.8.10/lib/tar.c:483:5: enter_function: entry to 'tarerofs_parse_pax_header'
erofs-utils-1.8.10/lib/tar.c:489:15: acquire_memory: allocated here
erofs-utils-1.8.10/lib/tar.c:490:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
erofs-utils-1.8.10/lib/tar.c:494:15: branch_false: ...to here
erofs-utils-1.8.10/lib/tar.c:494:15: call_function: calling 'erofs_iostream_bread' from 'tarerofs_parse_pax_header'
Error: CPPCHECK_WARNING (CWE-476): [#def96]
erofs-utils-1.8.10/lib/tar.c:530: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: eh->path
Error: CPPCHECK_WARNING (CWE-401): [#def97]
erofs-utils-1.8.10/lib/xattr.c:361: error[memleak]: Memory leak: node
Error: CPPCHECK_WARNING (CWE-476): [#def98]
erofs-utils-1.8.10/lib/xattr.c:486: warning[nullPointer]: Possible null pointer dereference: value
Error: GCC_ANALYZER_WARNING (CWE-688): [#def99]
erofs-utils-1.8.10/lib/xattr.c:1491:9: warning[-Wanalyzer-null-argument]: use of NULL 'infix' where non-null expected
erofs-utils-1.8.10/lib/xattr.c:1543:12: enter_function: entry to 'shared_listxattr'
erofs-utils-1.8.10/lib/xattr.c:1548:21: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/xattr.c:1550:45: branch_true: ...to here
erofs-utils-1.8.10/lib/xattr.c:1553:20: branch_true: following 'true' branch (when 'i == 0')...
erofs-utils-1.8.10/lib/xattr.c:1554:58: branch_true: ...to here
erofs-utils-1.8.10/lib/xattr.c:1555:28: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/xattr.c:1558:25: branch_false: ...to here
erofs-utils-1.8.10/lib/xattr.c:1562:23: call_function: calling 'xattr_foreach' from 'shared_listxattr'
Error: CPPCHECK_WARNING (CWE-401): [#def100]
erofs-utils-1.8.10/lib/xattr.c:1620: error[memleak]: Memory leak: tnode
Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
erofs-utils-1.8.10/lib/xattr.c:1665:23: warning[-Wanalyzer-malloc-leak]: leak of 'pfs'
erofs-utils-1.8.10/lib/xattr.c:1654:12: branch_false: following 'false' branch...
erofs-utils-1.8.10/lib/xattr.c:1657:13: branch_false: ...to here
erofs-utils-1.8.10/lib/xattr.c:1660:15: acquire_memory: allocated here
erofs-utils-1.8.10/lib/xattr.c:1661:12: branch_false: following 'false' branch (when 'pfs' is non-NULL)...
erofs-utils-1.8.10/lib/xattr.c:1661:12: branch_false: ...to here
erofs-utils-1.8.10/lib/xattr.c:1664:21: branch_true: following 'true' branch...
erofs-utils-1.8.10/lib/xattr.c:1665:23: branch_true: ...to here
erofs-utils-1.8.10/lib/xattr.c:1665:23: throw: if 'erofs_read_metadata' throws an exception...
erofs-utils-1.8.10/lib/xattr.c:1665:23: danger: 'pfs' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
erofs-utils-1.8.10/mkfs/main.c:599:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(strdup(*<unknown>), 0)’
erofs-utils-1.8.10/mkfs/main.c:590:12: branch_true: following ‘true’ branch...
erofs-utils-1.8.10/mkfs/main.c:591:46: branch_true: ...to here
erofs-utils-1.8.10/mkfs/main.c:592:20: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/mkfs/main.c:594:22: branch_false: ...to here
erofs-utils-1.8.10/mkfs/main.c:594:22: acquire_resource: opened here
erofs-utils-1.8.10/mkfs/main.c:595:20: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/mkfs/main.c:599:23: branch_false: ...to here
erofs-utils-1.8.10/mkfs/main.c:599:23: danger: ‘open(strdup(*<unknown>), 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
erofs-utils-1.8.10/mkfs/main.c:648:31: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
erofs-utils-1.8.10/mkfs/main.c:616:20: branch_false: following ‘false’ branch (when ‘err == 0’)...
erofs-utils-1.8.10/mkfs/main.c:621:21: branch_false: ...to here
erofs-utils-1.8.10/mkfs/main.c:621:20: branch_true: following ‘true’ branch...
erofs-utils-1.8.10/mkfs/main.c:622:42: branch_true: ...to here
erofs-utils-1.8.10/mkfs/main.c:623:28: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/mkfs/main.c:628:25: branch_false: ...to here
erofs-utils-1.8.10/mkfs/main.c:637:12: branch_true: following ‘true’ branch...
erofs-utils-1.8.10/mkfs/main.c:638:23: branch_true: ...to here
erofs-utils-1.8.10/mkfs/main.c:642:31: acquire_memory: allocated here
erofs-utils-1.8.10/mkfs/main.c:643:28: branch_false: following ‘false’ branch (when ‘src’ is non-NULL)...
erofs-utils-1.8.10/mkfs/main.c:648:31: branch_false: ...to here
erofs-utils-1.8.10/mkfs/main.c:648:31: throw: if ‘erofs_dev_open’ throws an exception...
erofs-utils-1.8.10/mkfs/main.c:648:31: danger: ‘src’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
Error: CPPCHECK_WARNING (CWE-758): [#def104]
erofs-utils-1.8.10/mkfs/main.c:835: error[shiftTooManyBits]: Shifting 32-bit value by 63 bits is undefined behaviour
Error: GCC_ANALYZER_WARNING (CWE-775): [#def105]
erofs-utils-1.8.10/mkfs/main.c:1050:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dupfd’
erofs-utils-1.8.10/mkfs/main.c:1025:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/mkfs/main.c:1030:38: branch_false: ...to here
erofs-utils-1.8.10/mkfs/main.c:1031:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/mkfs/main.c:1034:13: branch_false: ...to here
erofs-utils-1.8.10/mkfs/main.c:1034:12: branch_false: following ‘false’ branch...
erofs-utils-1.8.10/mkfs/main.c:1038:20: branch_false: ...to here
erofs-utils-1.8.10/mkfs/main.c:1038:19: branch_true: following ‘true’ branch...
erofs-utils-1.8.10/mkfs/main.c:1044:25: branch_true: ...to here
erofs-utils-1.8.10/mkfs/main.c:1044:25: acquire_resource: opened here
erofs-utils-1.8.10/mkfs/main.c:1045:20: branch_false: following ‘false’ branch (when ‘dupfd >= 0’)...
erofs-utils-1.8.10/mkfs/main.c:1050:23: branch_false: ...to here
erofs-utils-1.8.10/mkfs/main.c:1050:23: throw: if ‘erofs_iostream_open’ throws an exception...
erofs-utils-1.8.10/mkfs/main.c:1050:23: danger: ‘dupfd’ leaks here; was opened at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
Scan Properties
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-234.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | erofs-utils-1.8.10-3.fc44 |
| store-results-to | /tmp/tmp7czp_lik/erofs-utils-1.8.10-3.fc44.tar.xz |
| time-created | 2026-01-08 15:58:42 |
| time-finished | 2026-01-08 16:00:32 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp7czp_lik/erofs-utils-1.8.10-3.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp7czp_lik/erofs-utils-1.8.10-3.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |