pkgconf-2.1.1-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
pkgconf-2.1.1-build/pkgconf-2.1.1/cli/bomtool/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
pkgconf-2.1.1-build/pkgconf-2.1.1/cli/getopt_long.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def3]
pkgconf-2.1.1-build/pkgconf-2.1.1/cli/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/argvsplit.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/argvsplit.c: scope_hint: In function 'pkgconf_argv_split'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/argvsplit.c:73:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'buf' where non-null expected
<built-in>: note: argument 1 of '__builtin_memset' must be non-null
#   71|   	dst_iter = buf;
#   72|   
#   73|-> 	memset(buf, 0, strlen(src) + 1);
#   74|   
#   75|   	*argv = calloc(argv_size, sizeof (void *));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/argvsplit.c:76:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*argv'
#   74|   
#   75|   	*argv = calloc(argv_size, sizeof (void *));
#   76|-> 	(*argv)[argc_count] = dst_iter;
#   77|   
#   78|   	while (*src_iter)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/client.c: scope_hint: In function 'pkgconf_client_init'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/client.c:98:36: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'client'
#   96|   pkgconf_client_init(pkgconf_client_t *client, pkgconf_error_handler_func_t error_handler, void *error_handler_data, const pkgconf_cross_personality_t *personality)
#   97|   {
#   98|-> 	client->error_handler_data = error_handler_data;
#   99|   	client->error_handler = error_handler;
#  100|   	client->auditf = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/dependency.c: scope_hint: In function 'pkgconf_dependency_addraw'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/dependency.c:134:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'dep'
#  132|   
#  133|   	dep = calloc(1, sizeof(pkgconf_dependency_t));
#  134|-> 	dep->package = pkgconf_strndup(package, package_sz);
#  135|   
#  136|   	if (version_sz != 0)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/dependency.c: scope_hint: In function 'pkgconf_dependency_copy'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/dependency.c:473:26: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'new_dep'
#  471|   
#  472|   	new_dep = calloc(1, sizeof(pkgconf_dependency_t));
#  473|-> 	new_dep->package = strdup(dep->package);
#  474|   
#  475|   	if (dep->version != NULL)

Error: CPPCHECK_WARNING: [#def10]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fileio.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_add.part.0'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c:148:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'frag'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_add.part.0'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_add.part.0'
#  146|   		frag = calloc(1, sizeof(pkgconf_fragment_t));
#  147|   
#  148|-> 		frag->type = *(string + 1);
#  149|   		frag->data = pkgconf_fragment_copy_munged(client, string + 2, flags);
#  150|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c:198:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'frag'
#  196|   
#  197|   		frag->type = 0;
#  198|-> 		frag->data = strdup(string);
#  199|   
#  200|   		PKGCONF_TRACE(client, "created special fragment {'%s'} in list @%p", frag->data, list);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_copy'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c:358:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'frag'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_copy'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_copy'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c:17: included_from: Included from here.
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/fragment.c:211:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY_REVERSE'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/libpkgconf.h:26: included_from: Included from here.
#  356|   	frag = calloc(1, sizeof(pkgconf_fragment_t));
#  357|   
#  358|-> 	frag->type = base->type;
#  359|   	frag->merged = base->merged;
#  360|   	if (base->data != NULL)

Error: CPPCHECK_WARNING: [#def14]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/parser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/path.c: scope_hint: In function 'prepare_path_node'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/path.c:94:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'node'
#   92|   
#   93|   	node = calloc(1, sizeof(pkgconf_path_t));
#   94|-> 	node->path = strdup(path);
#   95|   
#   96|   #ifdef PKGCONF_CACHE_INODES

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/path.c: scope_hint: In function 'pkgconf_path_copy_list'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/path.c:270:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'path'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/path.c:18: included_from: Included from here.
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/path.c:265:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
#  268|   
#  269|   		path = calloc(1, sizeof(pkgconf_path_t));
#  270|-> 		path->path = strdup(srcpath->path);
#  271|   
#  272|   #ifdef PKGCONF_CACHE_INODES

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/personality.c: scope_hint: In function 'load_personality_with_path'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/personality.c:264:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'p'
#  262|   	p = calloc(1, sizeof(pkgconf_cross_personality_t));
#  263|   	if (triplet != NULL)
#  264|-> 		p->name = strdup(triplet);
#  265|   	pkgconf_parser_parse(f, p, personality_parser_ops, personality_warn_func, pathbuf);
#  266|   

Error: CPPCHECK_WARNING: [#def18]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def19]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c: scope_hint: In function 'convert_path_to_value'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:253:32: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'path' where non-null expected
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:18: included_from: Included from here.
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1562:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:780:25: note: in expansion of macro 'PKGCONF_TRACE'
<built-in>: note: argument 1 of '__builtin_strlen' must be non-null
#  251|   convert_path_to_value(const char *path)
#  252|   {
#  253|-> 	char *buf = calloc(1, (strlen(path) + 1) * 2);
#  254|   	char *bptr = buf;
#  255|   	const char *i;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:260:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'bptr'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1562:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:780:25: note: in expansion of macro 'PKGCONF_TRACE'
#  258|   	{
#  259|   		if (*i == PKG_DIR_SEP_S)
#  260|-> 			*bptr++ = '/';
#  261|   		else if (*i == ' ') {
#  262|   			*bptr++ = '\\';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:262:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'bptr'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1562:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:780:25: note: in expansion of macro 'PKGCONF_TRACE'
#  260|   			*bptr++ = '/';
#  261|   		else if (*i == ' ') {
#  262|-> 			*bptr++ = '\\';
#  263|   			*bptr++ = *i;
#  264|   		} else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:265:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'bptr'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1562:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:780:25: note: in expansion of macro 'PKGCONF_TRACE'
#  263|   			*bptr++ = *i;
#  264|   		} else
#  265|-> 			*bptr++ = *i;
#  266|   	}
#  267|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c: scope_hint: In function 'pkgconf_pkg_new_from_file'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:423:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'pkg'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1562:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:780:25: note: in expansion of macro 'PKGCONF_TRACE'
#  421|   
#  422|   	pkg = calloc(1, sizeof(pkgconf_pkg_t));
#  423|-> 	pkg->owner = client;
#  424|   	pkg->filename = strdup(filename);
#  425|   	pkg->pc_filedir = pkg_get_parent_dir(pkg);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def24]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:456:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'strdup(idptr)' where non-null expected
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1562:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:780:25: note: in expansion of macro 'PKGCONF_TRACE'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/stdinc.h:25: included_from: Included from here.
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:17: included_from: Included from here.
/usr/include/string.h:273:14: note: argument 1 of 'strrchr' must be non-null
#  454|   
#  455|   	pkg->id = strdup(idptr);
#  456|-> 	idptr = strrchr(pkg->id, '.');
#  457|   	if (idptr)
#  458|   		*idptr = '\0';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c: scope_hint: In function 'pkgconf_pkg_unref'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:593:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'pkg'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1562:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c:1569:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY'
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/pkg.c: scope_hint: In function 'pkgconf_pkg_unref'
#  591|   pkgconf_pkg_unref(pkgconf_client_t *client, pkgconf_pkg_t *pkg)
#  592|   {
#  593|-> 	if (pkg->owner != NULL && pkg->owner != client)
#  594|   		PKGCONF_TRACE(client, "WTF: client %p unrefs package %p owned by other client %p", client, pkg, pkg->owner);
#  595|   

Error: CPPCHECK_WARNING: [#def26]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/queue.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def27]
pkgconf-2.1.1-build/pkgconf-2.1.1/libpkgconf/tuple.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-170.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepkgconf-2.1.1-1.fc41
store-results-to/tmp/tmpyf8h3rjy/pkgconf-2.1.1-1.fc41.tar.xz
time-created2024-07-03 17:00:13
time-finished2024-07-03 17:01:22
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpyf8h3rjy/pkgconf-2.1.1-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpyf8h3rjy/pkgconf-2.1.1-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9