Task #91315 - added.err
back to task #91315download
Error: GCC_ANALYZER_WARNING (CWE-401):
libarchive-3.8.4/libarchive/archive_read_disk_posix.c:2366:33: warning[-Wanalyzer-malloc-leak]: leak of '*t.d'
libarchive-3.8.4/libarchive/archive_read_disk_posix.c:1117:1: enter_function: entry to '_archive_read_next_header2'
libarchive-3.8.4/libarchive/archive_read_disk_posix.c:1123:9: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_read_disk_posix.c:1127:9: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_read_disk_posix.c:1136:21: call_function: calling 'next_entry' from '_archive_read_next_header2'
# 2364| fd = tree_dup(t->working_dir_fd);
# 2365| if (fd != -1)
# 2366|-> t->d = fdopendir(fd);
# 2367| }
# 2368| #else /* HAVE_FDOPENDIR */
Error: GCC_ANALYZER_WARNING (CWE-401):
libarchive-3.8.4/libarchive/archive_read_open_filename.c:140:21: warning[-Wanalyzer-malloc-leak]: leak of 'mine'
libarchive-3.8.4/libarchive/archive_read_open_filename.c:119:12: branch_false: following 'false' branch (when 'filenames' is NULL)...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:122:9: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:125:20: branch_true: following 'true' branch (when 'filename' is NULL)...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:125:20: branch_true: ...to here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:127:24: acquire_memory: allocated here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:129:20: branch_false: following 'false' branch (when 'mine' is non-NULL)...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:131:24: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:136:21: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:136:21: branch_true: ...to here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:140:21: throw: if 'archive_read_append_callback_data' throws an exception...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:140:21: danger: 'mine' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 138| } else
# 139| mine->filename_type = FNT_MBS;
# 140|-> if (archive_read_append_callback_data(a, mine) != (ARCHIVE_OK)) {
# 141| free(mine);
# 142| return (ARCHIVE_FATAL);
Error: GCC_ANALYZER_WARNING (CWE-401):
libarchive-3.8.4/libarchive/archive_read_open_filename.c:222:21: warning[-Wanalyzer-malloc-leak]: leak of 'mine'
libarchive-3.8.4/libarchive/archive_read_open_filename.c:174:12: branch_false: following 'false' branch (when 'wfilenames' is NULL)...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:177:9: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:180:20: branch_true: following 'true' branch (when 'wfilename' is NULL)...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:180:20: branch_true: ...to here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:182:24: acquire_memory: allocated here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:184:20: branch_false: following 'false' branch (when 'mine' is non-NULL)...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:186:17: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:189:21: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:190:25: branch_true: ...to here
libarchive-3.8.4/libarchive/archive_read_open_filename.c:222:21: throw: if 'archive_read_append_callback_data' throws an exception...
libarchive-3.8.4/libarchive/archive_read_open_filename.c:222:21: danger: 'mine' leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
# 220| #endif
# 221| }
# 222|-> if (archive_read_append_callback_data(a, mine) != (ARCHIVE_OK)) {
# 223| free(mine);
# 224| return (ARCHIVE_FATAL);
Error: GCC_ANALYZER_WARNING (CWE-401):
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4106:18: warning[-Wanalyzer-malloc-leak]: leak of 'metadata'
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4124:1: enter_function: entry to 'zip_read_mac_metadata'
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4157:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4163:13: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4163:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4170:20: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4170:20: acquire_memory: allocated here
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4171:12: branch_false: following 'false' branch (when 'metadata' is non-NULL)...
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4177:22: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_read_support_format_zip.c:4183:17: call_function: calling 'zip_get_local_file_header_size' from 'zip_read_mac_metadata'
# 4104| ssize_t filename_length, extra_length;
# 4105|
# 4106|-> if ((p = __archive_read_ahead(a, extra + ZIP_LOCHDR_LEN, NULL)) == NULL) {
# 4107| archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
# 4108| "Truncated ZIP file header");
Error: CPPCHECK_WARNING (CWE-457):
libarchive-3.8.4/libarchive/archive_util.c:461: error[uninitvar]: Uninitialized variable: rgid
# 459| if (getresgid(&ruid, &egid, &sgid) != 0)
# 460| return (-1);
# 461|-> if (rgid != egid || rgid != sgid)
# 462| return (1);
# 463| #elif HAVE_GETEUID
Error: GCC_ANALYZER_WARNING (CWE-457):
libarchive-3.8.4/libarchive/archive_util.c:461:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'rgid'
libarchive-3.8.4/libarchive/archive_util.c:455:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_util.c:457:13: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_util.c:457:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_util.c:459:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_util.c:461:13: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_util.c:461:12: danger: use of uninitialized value 'rgid' here
# 459| if (getresgid(&ruid, &egid, &sgid) != 0)
# 460| return (-1);
# 461|-> if (rgid != egid || rgid != sgid)
# 462| return (1);
# 463| #elif HAVE_GETEUID
Error: COMPILER_WARNING (CWE-457):
libarchive-3.8.4/libarchive/archive_util.c:461:12: warning[-Wmaybe-uninitialized]: 'rgid' may be used uninitialized
# 461 | if (rgid != egid || rgid != sgid)
# | ^
libarchive-3.8.4/libarchive/archive_util.c: scope_hint: In function '__archive_get_tempdir'
libarchive-3.8.4/libarchive/archive_util.c:454:15: note: 'rgid' was declared here
# 454 | gid_t rgid, egid, sgid;
# | ^~~~
# 459| if (getresgid(&ruid, &egid, &sgid) != 0)
# 460| return (-1);
# 461|-> if (rgid != egid || rgid != sgid)
# 462| return (1);
# 463| #elif HAVE_GETEUID
Error: GCC_ANALYZER_WARNING (CWE-401):
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:3421:29: warning[-Wanalyzer-malloc-leak]: leak of 'writer'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1573:1: enter_function: entry to 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1591:13: call_function: calling 'xml_writer_create' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1591:13: return_function: returning to 'make_toc' from 'xml_writer_create'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1592:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1598:13: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1606:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1616:13: call_function: inlined call to 'xml_writer_start_element' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1617:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1623:13: call_function: inlined call to 'xml_writer_start_element' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1624:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1634:13: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1634:13: call_function: calling 'xmlwrite_time' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1634:13: return_function: returning to 'make_toc' from 'xmlwrite_time'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1635:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1641:19: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1641:19: call_function: inlined call to 'getalgsize' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1687:20: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1693:21: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1754:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1761:13: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1761:13: call_function: calling 'xml_writer_get_final_content_and_length' from 'make_toc'
# 3419| const char **out, size_t *size)
# 3420| {
# 3421|-> *out = (const char*)xmlBufferContent(ctx->bp);
# 3422| *size = (size_t)xmlBufferLength(ctx->bp);
# 3423| return (0);
Error: GCC_ANALYZER_WARNING (CWE-401):
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:3422:25: warning[-Wanalyzer-malloc-leak]: leak of 'writer'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1573:1: enter_function: entry to 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1591:13: call_function: calling 'xml_writer_create' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1591:13: return_function: returning to 'make_toc' from 'xml_writer_create'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1592:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1598:13: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1606:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1616:13: call_function: inlined call to 'xml_writer_start_element' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1617:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1623:13: call_function: inlined call to 'xml_writer_start_element' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1624:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1634:13: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1634:13: call_function: calling 'xmlwrite_time' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1634:13: return_function: returning to 'make_toc' from 'xmlwrite_time'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1635:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1641:19: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1641:19: call_function: inlined call to 'getalgsize' from 'make_toc'
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1687:20: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1693:21: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1754:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1761:13: branch_false: ...to here
libarchive-3.8.4/libarchive/archive_write_set_format_xar.c:1761:13: call_function: calling 'xml_writer_get_final_content_and_length' from 'make_toc'
# 3420| {
# 3421| *out = (const char*)xmlBufferContent(ctx->bp);
# 3422|-> *size = (size_t)xmlBufferLength(ctx->bp);
# 3423| return (0);
# 3424| }
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdin_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_true: following 'true' branch (when 'child == 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: danger: 'stdin_pipe[0]' leaks here
# 172| goto stdout_opened;
# 173| if (child == 0) {
# 174|-> close(stdin_pipe[1]);
# 175| close(stdout_pipe[0]);
# 176| if (dup2(stdin_pipe[0], 0 /* stdin */) == -1)
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_true: following 'true' branch (when 'child == 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: danger: 'stdout_pipe[0]' leaks here
# 172| goto stdout_opened;
# 173| if (child == 0) {
# 174|-> close(stdin_pipe[1]);
# 175| close(stdout_pipe[0]);
# 176| if (dup2(stdin_pipe[0], 0 /* stdin */) == -1)
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_true: following 'true' branch (when 'child == 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: danger: 'stdout_pipe[1]' leaks here
# 172| goto stdout_opened;
# 173| if (child == 0) {
# 174|-> close(stdin_pipe[1]);
# 175| close(stdout_pipe[0]);
# 176| if (dup2(stdin_pipe[0], 0 /* stdin */) == -1)
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'tmp'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:28: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:28: acquire_resource: opened here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_false: following 'false' branch (when 'tmp != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:112:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_true: following 'true' branch (when 'child == 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: danger: 'tmp' leaks here; was opened at [(15)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/14)
# 172| goto stdout_opened;
# 173| if (child == 0) {
# 174|-> close(stdin_pipe[1]);
# 175| close(stdout_pipe[0]);
# 176| if (dup2(stdin_pipe[0], 0 /* stdin */) == -1)
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:176:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dup2(stdin_pipe[0], 0)'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_true: following 'true' branch (when 'child == 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:176:21: acquire_resource: opened here
libarchive-3.8.4/libarchive/filter_fork_posix.c:176:20: danger: 'dup2(stdin_pipe[0], 0)' leaks here; was opened at [(19)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/18)
# 174| close(stdin_pipe[1]);
# 175| close(stdout_pipe[0]);
# 176|-> if (dup2(stdin_pipe[0], 0 /* stdin */) == -1)
# 177| _exit(254);
# 178| if (stdin_pipe[0] != 0 /* stdin */)
Error: GCC_ANALYZER_WARNING:
libarchive-3.8.4/libarchive/filter_fork_posix.c:176:21: warning[-Wanalyzer-fd-use-without-check]: 'dup2' on possibly invalid file descriptor '0'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:28: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_false: following 'false' branch (when 'tmp != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:112:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:112:17: release_resource: closed here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_true: following 'true' branch (when 'child == 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:176:21: danger: '0' could be invalid
# 174| close(stdin_pipe[1]);
# 175| close(stdout_pipe[0]);
# 176|-> if (dup2(stdin_pipe[0], 0 /* stdin */) == -1)
# 177| _exit(254);
# 178| if (stdin_pipe[0] != 0 /* stdin */)
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:179:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_true: following 'true' branch (when 'child == 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:176:20: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:178:21: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:178:20: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:179:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:179:25: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:179:25: danger: 'stdout_pipe[1]' leaks here
# 177| _exit(254);
# 178| if (stdin_pipe[0] != 0 /* stdin */)
# 179|-> close(stdin_pipe[0]);
# 180| if (dup2(stdout_pipe[1], 1 /* stdout */) == -1)
# 181| _exit(254);
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:180:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dup2(stdout_pipe[1], 1)'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_true: following 'true' branch (when 'child == 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:176:20: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:178:21: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:178:20: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:180:21: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:180:21: acquire_resource: opened here
libarchive-3.8.4/libarchive/filter_fork_posix.c:180:20: danger: 'dup2(stdout_pipe[1], 1)' leaks here; was opened at [(23)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/22)
# 178| if (stdin_pipe[0] != 0 /* stdin */)
# 179| close(stdin_pipe[0]);
# 180|-> if (dup2(stdout_pipe[1], 1 /* stdout */) == -1)
# 181| _exit(254);
# 182| if (stdout_pipe[1] != 1 /* stdout */)
Error: GCC_ANALYZER_WARNING:
libarchive-3.8.4/libarchive/filter_fork_posix.c:180:21: warning[-Wanalyzer-fd-use-without-check]: 'dup2' on possibly invalid file descriptor '1'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:28: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:20: branch_false: following 'false' branch (when 'tmp != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:104:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:104:17: release_resource: closed here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_true: following 'true' branch (when 'child == 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:174:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:176:20: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:178:21: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:178:20: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:180:21: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:180:21: danger: '1' could be invalid
# 178| if (stdin_pipe[0] != 0 /* stdin */)
# 179| close(stdin_pipe[0]);
# 180|-> if (dup2(stdout_pipe[1], 1 /* stdout */) == -1)
# 181| _exit(254);
# 182| if (stdout_pipe[1] != 1 /* stdout */)
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdin_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: following 'false' branch (when 'child != 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: danger: 'stdin_pipe[0]' leaks here
# 197| #endif /* HAVE_POSIX_SPAWNP */
# 198|
# 199|-> close(stdin_pipe[0]);
# 200| close(stdout_pipe[1]);
# 201|
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: following 'false' branch (when 'child != 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: danger: 'stdout_pipe[0]' leaks here
# 197| #endif /* HAVE_POSIX_SPAWNP */
# 198|
# 199|-> close(stdin_pipe[0]);
# 200| close(stdout_pipe[1]);
# 201|
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: following 'false' branch (when 'child != 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: danger: 'stdout_pipe[1]' leaks here
# 197| #endif /* HAVE_POSIX_SPAWNP */
# 198|
# 199|-> close(stdin_pipe[0]);
# 200| close(stdout_pipe[1]);
# 201|
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'tmp'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:28: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:28: acquire_resource: opened here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_false: following 'false' branch (when 'tmp != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:112:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: following 'false' branch (when 'child != 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: danger: 'tmp' leaks here; was opened at [(15)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/14)
# 197| #endif /* HAVE_POSIX_SPAWNP */
# 198|
# 199|-> close(stdin_pipe[0]);
# 200| close(stdout_pipe[1]);
# 201|
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:200:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: following 'false' branch (when 'child != 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:200:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:200:9: danger: 'stdout_pipe[0]' leaks here
# 198|
# 199| close(stdin_pipe[0]);
# 200|-> close(stdout_pipe[1]);
# 201|
# 202| *child_stdin = stdin_pipe[1];
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:200:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: following 'false' branch (when 'child != 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:200:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:200:9: danger: 'stdout_pipe[1]' leaks here
# 198|
# 199| close(stdin_pipe[0]);
# 200|-> close(stdout_pipe[1]);
# 201|
# 202| *child_stdin = stdin_pipe[1];
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:200:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'tmp'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:28: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:28: acquire_resource: opened here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_false: following 'false' branch (when 'tmp != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:112:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: following 'false' branch (when 'child != 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:200:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:200:9: danger: 'tmp' leaks here; was opened at [(15)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/14)
# 198|
# 199| close(stdin_pipe[0]);
# 200|-> close(stdout_pipe[1]);
# 201|
# 202| *child_stdin = stdin_pipe[1];
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:203:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:167:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:171:12: branch_false: following 'false' branch (when 'child != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:173:12: branch_false: following 'false' branch (when 'child != 0')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:199:9: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:203:9: throw: if 'fcntl' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:203:9: danger: 'stdout_pipe[0]' leaks here
# 201|
# 202| *child_stdin = stdin_pipe[1];
# 203|-> fcntl(*child_stdin, F_SETFL, O_NONBLOCK);
# 204| *child_stdout = stdout_pipe[0];
# 205| fcntl(*child_stdout, F_SETFL, O_NONBLOCK);
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdin_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:111:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: danger: 'stdin_pipe[0]' leaks here
# 217| #endif
# 218| stdout_opened:
# 219|-> close(stdout_pipe[0]);
# 220| close(stdout_pipe[1]);
# 221| stdin_opened:
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdin_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:111:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: danger: 'stdin_pipe[1]' leaks here
# 217| #endif
# 218| stdout_opened:
# 219|-> close(stdout_pipe[0]);
# 220| close(stdout_pipe[1]);
# 221| stdin_opened:
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:111:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: danger: 'stdout_pipe[0]' leaks here
# 217| #endif
# 218| stdout_opened:
# 219|-> close(stdout_pipe[0]);
# 220| close(stdout_pipe[1]);
# 221| stdin_opened:
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:111:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: danger: 'stdout_pipe[1]' leaks here
# 217| #endif
# 218| stdout_opened:
# 219|-> close(stdout_pipe[0]);
# 220| close(stdout_pipe[1]);
# 221| stdin_opened:
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'tmp'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:28: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:28: acquire_resource: opened here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:20: branch_false: following 'false' branch (when 'tmp != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:104:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:111:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:219:9: danger: 'tmp' leaks here; was opened at [(10)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/9)
# 217| #endif
# 218| stdout_opened:
# 219|-> close(stdout_pipe[0]);
# 220| close(stdout_pipe[1]);
# 221| stdin_opened:
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdin_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:111:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: danger: 'stdin_pipe[0]' leaks here
# 218| stdout_opened:
# 219| close(stdout_pipe[0]);
# 220|-> close(stdout_pipe[1]);
# 221| stdin_opened:
# 222| close(stdin_pipe[0]);
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdin_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:111:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: danger: 'stdin_pipe[1]' leaks here
# 218| stdout_opened:
# 219| close(stdout_pipe[0]);
# 220|-> close(stdout_pipe[1]);
# 221| stdin_opened:
# 222| close(stdin_pipe[0]);
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdout_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:111:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: danger: 'stdout_pipe[1]' leaks here
# 218| stdout_opened:
# 219| close(stdout_pipe[0]);
# 220|-> close(stdout_pipe[1]);
# 221| stdin_opened:
# 222| close(stdin_pipe[0]);
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'tmp'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:28: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:28: acquire_resource: opened here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:20: branch_false: following 'false' branch (when 'tmp != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:104:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:109:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:110:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:111:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:220:9: danger: 'tmp' leaks here; was opened at [(10)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/9)
# 218| stdout_opened:
# 219| close(stdout_pipe[0]);
# 220|-> close(stdout_pipe[1]);
# 221| stdin_opened:
# 222| close(stdin_pipe[0]);
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:222:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdin_pipe[0]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:103:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:222:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:222:9: danger: 'stdin_pipe[0]' leaks here
# 220| close(stdout_pipe[1]);
# 221| stdin_opened:
# 222|-> close(stdin_pipe[0]);
# 223| close(stdin_pipe[1]);
# 224| state_allocated:
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:222:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdin_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:103:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:222:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:222:9: danger: 'stdin_pipe[1]' leaks here
# 220| close(stdout_pipe[1]);
# 221| stdin_opened:
# 222|-> close(stdin_pipe[0]);
# 223| close(stdin_pipe[1]);
# 224| state_allocated:
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:222:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'tmp'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:12: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:28: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:28: acquire_resource: opened here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:20: branch_false: following 'false' branch (when 'tmp != -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:104:17: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:107:12: branch_true: following 'true' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:108:17: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:222:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:222:9: danger: 'tmp' leaks here; was opened at [(10)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/9)
# 220| close(stdout_pipe[1]);
# 221| stdin_opened:
# 222|-> close(stdin_pipe[0]);
# 223| close(stdin_pipe[1]);
# 224| state_allocated:
Error: GCC_ANALYZER_WARNING (CWE-775):
libarchive-3.8.4/libarchive/filter_fork_posix.c:223:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'stdin_pipe[1]'
libarchive-3.8.4/libarchive/filter_fork_posix.c:94:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:96:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:99:12: branch_false: following 'false' branch...
libarchive-3.8.4/libarchive/filter_fork_posix.c:101:13: branch_false: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:102:20: branch_true: following 'true' branch (when 'tmp == -1')...
libarchive-3.8.4/libarchive/filter_fork_posix.c:103:25: branch_true: ...to here
libarchive-3.8.4/libarchive/filter_fork_posix.c:223:9: throw: if 'close' throws an exception...
libarchive-3.8.4/libarchive/filter_fork_posix.c:223:9: danger: 'stdin_pipe[1]' leaks here
# 221| stdin_opened:
# 222| close(stdin_pipe[0]);
# 223|-> close(stdin_pipe[1]);
# 224| state_allocated:
# 225| __archive_cmdline_free(cmdline);
Error: CPPCHECK_WARNING (CWE-457):
libarchive-3.8.4/tar/util.c:777: warning[uninitvar]: Uninitialized variable: sw
# 775| if (ltime)
# 776| sw = strftime(tmp, sizeof(tmp), fmt, ltime);
# 777|-> if (!ltime || !sw)
# 778| sprintf(tmp, "-- -- ----");
# 779| fprintf(out, " %s ", tmp);