libarchive-3.7.7-1.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
libarchive-3.7.7-build/libarchive-3.7.7/cpio/cpio.c: scope_hint: In function ‘mode_pass’
libarchive-3.7.7-build/libarchive-3.7.7/cpio/cpio.c:1233:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*cpio.destdir’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
# 1231|   	cpio->destdir_len = strlen(destdir);
# 1232|   	cpio->destdir = malloc(cpio->destdir_len + 8);
# 1233|-> 	memcpy(cpio->destdir, destdir, cpio->destdir_len);
# 1234|   	if (cpio->destdir_len == 0 || destdir[cpio->destdir_len - 1] != '/')
# 1235|   		cpio->destdir[cpio->destdir_len++] = '/';

Error: CPPCHECK_WARNING (CWE-401): [#def2]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_match.c:236: error[memleak]: Memory leak: a
#  234|   	match_list_init(&(a->inclusion_gnames));
#  235|   	time(&a->now);
#  236|-> 	return (&(a->archive));
#  237|   }
#  238|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c: scope_hint: In function '__archive_rb_tree_swap_prune_and_rebalance'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:63:11: warning[-Wanalyzer-null-dereference]: dereference of NULL 'standin'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:374:44: note: in expansion of macro 'RB_POSITION'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:53:35: note: in definition of macro 'RB_SENTINEL_P'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:54:53: note: in expansion of macro 'rb_left'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:58:28: note: in expansion of macro 'RB_LEFT_SENTINEL_P'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:515:13: note: in expansion of macro 'RB_CHILDLESS_P'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:520:14: note: in expansion of macro 'RB_TWOCHILDREN_P'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:538:17: note: in expansion of macro 'RB_POSITION'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:53:35: note: in definition of macro 'RB_SENTINEL_P'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_rb.c:374:44: note: in expansion of macro 'RB_POSITION'
#   61|   
#   62|   #define	RB_POSITION(rb)	\
#   63|->     (((rb)->rb_info & RB_FLAG_POSITION) ? RB_DIR_RIGHT : RB_DIR_LEFT)
#   64|   #define	RB_RIGHT_P(rb)		(RB_POSITION(rb) == RB_DIR_RIGHT)
#   65|   #define	RB_LEFT_P(rb)		(RB_POSITION(rb) == RB_DIR_LEFT)

Error: CPPCHECK_WARNING (CWE-401): [#def4]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_add_passphrase.c:83: error[memleak]: Memory leak: p.passphrase
#   81|   		return (NULL);
#   82|   	}
#   83|-> 	return (p);
#   84|   }
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_disk_posix.c: scope_hint: In function 'setup_sparse'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_disk_posix.c:1207:20: warning[-Wanalyzer-malloc-leak]: leak of '*t.sparse_list'
# 1205|   		t->sparse_list = malloc(sizeof(t->sparse_list[0]) *
# 1206|   		    t->sparse_list_size);
# 1207|-> 		if (t->sparse_list == NULL) {
# 1208|   			t->sparse_list_size = 0;
# 1209|   			archive_set_error(&a->archive, ENOMEM,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_disk_posix.c: scope_hint: In function 'tree_reopen'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_disk_posix.c:2237:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*t.initial_dir_fd'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_disk_posix.c:97: included_from: Included from here.
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_disk_posix.c:1322:9: note: in expansion of macro 'archive_check_magic'
# 2235|   	 * unhelpful and unnecessary errors later.
# 2236|   	 */
# 2237|-> 	if (t->initial_dir_fd < 0)
# 2238|   		t->initial_dir_fd = open(".", o_flag | O_CLOEXEC);
# 2239|   #endif

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_disk_posix.c:2238:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*t.initial_dir_fd'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_disk_posix.c:1322:9: note: in expansion of macro 'archive_check_magic'
# 2236|   	 */
# 2237|   	if (t->initial_dir_fd < 0)
# 2238|-> 		t->initial_dir_fd = open(".", o_flag | O_CLOEXEC);
# 2239|   #endif
# 2240|   	__archive_ensure_cloexec_flag(t->initial_dir_fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_filter_gzip.c: scope_hint: In function 'peek_at_header'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_filter_gzip.c:200:37: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(p + (sizetype)len)'
#  198|   			/* Reset the name in case of repeat header reads. */
#  199|   			free(state->name);
#  200|-> 			state->name = strdup((const char *)&p[file_start]);
#  201|   		}
#  202|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_filter_lz4.c: scope_hint: In function 'lz4_allocate_out_block'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_filter_lz4.c:260:12: warning[-Wanalyzer-malloc-leak]: leak of 'out_block'
#  258|   		state->out_block = out_block;
#  259|   	}
#  260|-> 	if (!state->flags.block_independence)
#  261|   		memset(state->out_block, 0, 64 * 1024);
#  262|   	return (ARCHIVE_OK);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_filter_lz4.c:261:17: warning[-Wanalyzer-malloc-leak]: leak of 'out_block'
#  259|   	}
#  260|   	if (!state->flags.block_independence)
#  261|-> 		memset(state->out_block, 0, 64 * 1024);
#  262|   	return (ARCHIVE_OK);
#  263|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_filter_program.c: scope_hint: In function 'archive_read_support_filter_program_signature'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_filter_program.c:152:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'malloc(signature_len)' where non-null expected
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
#  150|   		state->signature_len = signature_len;
#  151|   		state->signature = malloc(signature_len);
#  152|-> 		memcpy(state->signature, signature, signature_len);
#  153|   	}
#  154|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_filter_uu.c: scope_hint: In function 'ensure_in_buff_size'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_filter_uu.c:438:40: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
#  436|   		free(uudecode->in_buff);
#  437|   		uudecode->in_buff = ptr;
#  438|-> 		uudecode->in_allocated = newsize;
#  439|   	}
#  440|   	return (ARCHIVE_OK);

Error: COMPILER_WARNING: [#def13]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_format_rar.c: scope_hint: In function 'parse_codes'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_format_rar.c:2399:29: warning[-Wstringop-overflow=]: writing 16 bytes into a region of size 4
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_format_rar.c:2270:17: note: at offset [16, 20] into destination object 'bitlengths' of size 20
# 2397|             i--;
# 2398|             for (j = 0; j < zerocount + 2 && i < MAX_SYMBOLS; j++)
# 2399|->             bitlengths[i++] = 0;
# 2400|           }
# 2401|         }

Error: COMPILER_WARNING: [#def14]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_format_rar5.c: scope_hint: In function 'parse_tables.constprop'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_format_rar5.c:2701:57: warning[-Wstringop-overflow=]: writing 16 bytes into a region of size 4
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_read_support_format_rar5.c:2655:17: note: at offset [16, 20] into destination object 'bit_length' of size 20
# 2699|   				for(k = 0; (k < value + 2) && (w < HUFF_BC);
# 2700|   				    k++) {
# 2701|-> 					bit_length[w++] = 0;
# 2702|   				}
# 2703|   			}

Error: GCC_ANALYZER_WARNING (CWE-465): [#def15]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_string.c: scope_hint: In function 'archive_string_append'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_string.c:205:12: warning[-Wanalyzer-deref-before-check]: check of 'as' for NULL after already dereferencing it
#  203|   archive_string_append(struct archive_string *as, const char *p, size_t s)
#  204|   {
#  205|-> 	if (archive_string_ensure(as, as->length + s + 1) == NULL)
#  206|   		return (NULL);
#  207|   	if (s)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def16]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_util.c: scope_hint: In function 'archive_utility_string_sort_helper'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_util.c:654:31: warning[-Wanalyzer-double-free]: double-'free' of 'lesser'
#  652|   		{
#  653|   			lesser_count++;
#  654|-> 			tmp = realloc(lesser, lesser_count * sizeof(*tmp));
#  655|   			if (!tmp) {
#  656|   				free(greater);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def17]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_util.c:656:33: warning[-Wanalyzer-double-free]: double-'free' of 'greater'
#  654|   			tmp = realloc(lesser, lesser_count * sizeof(*tmp));
#  655|   			if (!tmp) {
#  656|-> 				free(greater);
#  657|   				free(lesser);
#  658|   				return (ARCHIVE_FATAL);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def18]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_util.c:666:31: warning[-Wanalyzer-double-free]: double-'free' of 'greater'
#  664|   		{
#  665|   			greater_count++;
#  666|-> 			tmp = realloc(greater, greater_count * sizeof(*tmp));
#  667|   			if (!tmp) {
#  668|   				free(greater);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def19]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_util.c:669:33: warning[-Wanalyzer-double-free]: double-'free' of 'lesser'
#  667|   			if (!tmp) {
#  668|   				free(greater);
#  669|-> 				free(lesser);
#  670|   				return (ARCHIVE_FATAL);
#  671|   			}

Error: GCC_ANALYZER_WARNING (CWE-415): [#def20]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_util.c:681:9: warning[-Wanalyzer-double-free]: double-'free' of 'lesser'
#  679|   	for (i = 0; i < lesser_count; i++)
#  680|   		strings[i] = lesser[i];
#  681|-> 	free(lesser);
#  682|   
#  683|   	/* pivot */

Error: GCC_ANALYZER_WARNING (CWE-415): [#def21]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_util.c:690:9: warning[-Wanalyzer-double-free]: double-'free' of 'greater'
#  688|   	for (i = 0; i < greater_count; i++)
#  689|   		strings[lesser_count + 1 + i] = greater[i];
#  690|-> 	free(greater);
#  691|   
#  692|   	return (retval1 < retval2) ? retval1 : retval2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write.c: scope_hint: In function 'archive_write_new'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write.c:123:17: warning[-Wanalyzer-malloc-leak]: leak of 'a'
#  121|   	}
#  122|   	a->nulls = nulls;
#  123|-> 	return (&a->archive);
#  124|   }
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_add_filter_bzip2.c: scope_hint: In function 'archive_compressor_bzip2_open'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_add_filter_bzip2.c:181:20: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(bs)'
#  179|   		data->compressed_buffer_size = bs;
#  180|   		data->compressed = malloc(data->compressed_buffer_size);
#  181|-> 		if (data->compressed == NULL) {
#  182|   			archive_set_error(f->archive, ENOMEM,
#  183|   			    "Can't allocate data for compression buffer");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_add_filter_gzip.c: scope_hint: In function 'archive_compressor_gzip_open'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_add_filter_gzip.c:198:20: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(bs)'
#  196|   		data->compressed_buffer_size = bs;
#  197|   		data->compressed = malloc(data->compressed_buffer_size);
#  198|-> 		if (data->compressed == NULL) {
#  199|   			archive_set_error(f->archive, ENOMEM,
#  200|   			    "Can't allocate data for compression buffer");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_add_filter_xz.c: scope_hint: In function 'archive_compressor_xz_open'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_add_filter_xz.c:323:20: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(bs)'
#  321|   		data->compressed_buffer_size = bs;
#  322|   		data->compressed = malloc(data->compressed_buffer_size);
#  323|-> 		if (data->compressed == NULL) {
#  324|   			archive_set_error(f->archive, ENOMEM,
#  325|   			    "Can't allocate data for compression buffer");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_add_filter_zstd.c: scope_hint: In function 'archive_compressor_zstd_open'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_add_filter_zstd.c:376:20: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(bs)'
#  374|   		data->out.pos = 0;
#  375|   		data->out.dst = malloc(data->out.size);
#  376|-> 		if (data->out.dst == NULL) {
#  377|   			archive_set_error(f->archive, ENOMEM,
#  378|   			    "Can't allocate data for compression buffer");

Error: CPPCHECK_WARNING (CWE-401): [#def27]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_open_filename.c:113: error[memleak]: Memory leak: mine
#  111|   		if (errno == ENOMEM) {
#  112|   			archive_set_error(a, ENOMEM, "No memory");
#  113|-> 			return (ARCHIVE_FATAL);
#  114|   		}
#  115|   		if (mbs_fn)

Error: CPPCHECK_WARNING (CWE-401): [#def28]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_open_filename.c:123: error[memleak]: Memory leak: mine
#  121|   			    "Can't convert '%S' to MBS",
#  122|   			    (const wchar_t *)filename);
#  123|-> 		return (ARCHIVE_FAILED);
#  124|   	}
#  125|   	mine->fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def29]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_7zip.c: scope_hint: In function 'compress_out'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_7zip.c:592:21: warning[-Wanalyzer-infinite-loop]: infinite loop
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_7zip.c: scope_hint: In function 'compress_out'
#  590|   	for (;;) {
#  591|   		/* Compress file data. */
#  592|-> 		r = compression_code(&(a->archive), &(zip->stream), run);
#  593|   		if (r != ARCHIVE_OK && r != ARCHIVE_EOF)
#  594|   			return (ARCHIVE_FATAL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_cpio_binary.c: scope_hint: In function 'synthesize_ino_value'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_cpio_binary.c:324:9: warning[-Wanalyzer-malloc-leak]: leak of 'newlist'
#  322|   	cpio->ino_list[cpio->ino_list_next].old = ino;
#  323|   	cpio->ino_list[cpio->ino_list_next].new = ino_new;
#  324|-> 	++cpio->ino_list_next;
#  325|   	return (ino_new);
#  326|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_iso9660.c: scope_hint: In function 'isoent_rr_move'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_iso9660.c:6791:20: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_iso9660.c: scope_hint: In function 'isoent_rr_move'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_iso9660.c: scope_hint: In function 'isoent_rr_move'
# 6789|   		 * its sub directory entries move to rr_move too.
# 6790|   		 */
# 6791|-> 		np = last->ptnext;
# 6792|   	}
# 6793|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_mtree.c: scope_hint: In function 'mtree_entry_tree_add'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_mtree.c:2151:27: warning[-Wanalyzer-null-dereference]: dereference of NULL 'dent'
# 2149|   
# 2150|   		if (!__archive_rb_tree_insert_node(
# 2151|-> 		    &(dent->dir_info->rbtree),
# 2152|   		    (struct archive_rb_node *)file)) {
# 2153|   			np = (struct mtree_entry *)__archive_rb_tree_find_node(

Error: GCC_ANALYZER_WARNING (CWE-457): [#def33]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_zip.c: scope_hint: In function 'archive_write_zip_finish_entry'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/archive_write_set_format_zip.c:1291:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '&zip64'
# 1289|   			return (ARCHIVE_FATAL);
# 1290|   		}
# 1291|-> 		memcpy(zd, zip64, z - zip64);
# 1292|   		/* Zip64 means version needs to be set to at least 4.5 */
# 1293|   		if (archive_le16dec(zip->file_header + 6) < 45)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/xxhash.c:350:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'state'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/xxhash.c: scope_hint: In function 'XXH32_init'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive/xxhash.c:363:19: note: in expansion of macro 'XXH_malloc'
#  348|   {
#  349|       struct XXH_state32_t * state = (struct XXH_state32_t *) state_in;
#  350|->     state->seed = seed;
#  351|       state->v1 = seed + PRIME32_1 + PRIME32_2;
#  352|       state->v2 = seed + PRIME32_2;

Error: CPPCHECK_WARNING (CWE-401): [#def35]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive_fe/line_reader.c:77: error[memleak]: Memory leak: lr.pathname
#   75|   	lr->line_start = lr->line_end = lr->buff_end = lr->buff = NULL;
#   76|   
#   77|-> 	return (lr);
#   78|   }
#   79|   

Error: CPPCHECK_WARNING (CWE-404): [#def36]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive_fe/line_reader.c:77: error[resourceLeak]: Resource leak: lr.f
#   75|   	lr->line_start = lr->line_end = lr->buff_end = lr->buff = NULL;
#   76|   
#   77|-> 	return (lr);
#   78|   }
#   79|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
libarchive-3.7.7-build/libarchive-3.7.7/libarchive_fe/passphrase.c: scope_hint: In function 'readpassphrase'
libarchive-3.7.7-build/libarchive-3.7.7/libarchive_fe/passphrase.c:208:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/tty", 2)'
#  206|   	 * generate SIGTTOU, so do it *before* installing the signal handlers.
#  207|   	 */
#  208|-> 	if (input != STDIN_FILENO && tcgetattr(input, &oterm) == 0) {
#  209|   		memcpy(&term, &oterm, sizeof(term));
#  210|   		if (!(flags & RPP_ECHO_ON))

Error: CPPCHECK_WARNING (CWE-562): [#def38]
libarchive-3.7.7-build/libarchive-3.7.7/tar/write.c:342: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  340|   	struct archive_dir	 archive_dir;
#  341|   
#  342|-> 	bsdtar->archive_dir = &archive_dir;
#  343|   	memset(&archive_dir, 0, sizeof(archive_dir));
#  344|   

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-224.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibarchive-3.7.7-1.fc42
store-results-to/tmp/tmpe23uz3md/libarchive-3.7.7-1.fc42.tar.xz
time-created2024-11-13 01:14:29
time-finished2024-11-13 01:16:57
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpe23uz3md/libarchive-3.7.7-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpe23uz3md/libarchive-3.7.7-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9