Error: GCC_ANALYZER_WARNING (CWE-688): [#def1] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/argvsplit.c: scope_hint: In function 'pkgconf_argv_split' pkgconf-2.3.0-build/pkgconf-2.3.0/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): [#def2] pkgconf-2.3.0-build/pkgconf-2.3.0/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): [#def3] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/client.c: scope_hint: In function 'pkgconf_client_init' pkgconf-2.3.0-build/pkgconf-2.3.0/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): [#def4] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/dependency.c: scope_hint: In function 'pkgconf_dependency_addraw' pkgconf-2.3.0-build/pkgconf-2.3.0/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): [#def5] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/dependency.c: scope_hint: In function 'pkgconf_dependency_copy' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/dependency.c:474:26: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'new_dep' # 472| # 473| new_dep = calloc(1, sizeof(pkgconf_dependency_t)); # 474|-> new_dep->package = strdup(dep->package); # 475| # 476| if (dep->version != NULL) Error: GCC_ANALYZER_WARNING (CWE-476): [#def6] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_add.part.0' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c:180:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'frag' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_add.part.0' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_add.part.0' # 178| frag = calloc(1, sizeof(pkgconf_fragment_t)); # 179| # 180|-> frag->type = *(string + 1); # 181| frag->data = pkgconf_fragment_copy_munged(client, string + 2, flags); # 182| Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c:230:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'frag' # 228| # 229| frag->type = 0; # 230|-> frag->data = strdup(string); # 231| # 232| PKGCONF_TRACE(client, "created special fragment {'%s'} in list @%p", frag->data, list); Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_copy' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c:390:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'frag' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_copy' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c: scope_hint: In function 'pkgconf_fragment_copy' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c:17: included_from: Included from here. pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/fragment.c:243:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY_REVERSE' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/libpkgconf.h:26: included_from: Included from here. # 388| frag = calloc(1, sizeof(pkgconf_fragment_t)); # 389| # 390|-> frag->type = base->type; # 391| frag->merged = base->merged; # 392| if (base->data != NULL) Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/path.c: scope_hint: In function 'prepare_path_node' pkgconf-2.3.0-build/pkgconf-2.3.0/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): [#def10] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/path.c: scope_hint: In function 'pkgconf_path_copy_list' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/path.c:270:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'path' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/path.c:18: included_from: Included from here. pkgconf-2.3.0-build/pkgconf-2.3.0/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): [#def11] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/personality.c: scope_hint: In function 'load_personality_with_path' pkgconf-2.3.0-build/pkgconf-2.3.0/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: GCC_ANALYZER_WARNING (CWE-688): [#def12] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c: scope_hint: In function 'convert_path_to_value' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:253:32: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'path' where non-null expected pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:18: included_from: Included from here. pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1649:17: note: in expansion of macro 'PKGCONF_TRACE' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1560:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:778: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): [#def13] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:260:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'bptr' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1649:17: note: in expansion of macro 'PKGCONF_TRACE' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1560:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:778: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): [#def14] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:262:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'bptr' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1649:17: note: in expansion of macro 'PKGCONF_TRACE' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1560:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:778: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): [#def15] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:265:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'bptr' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1649:17: note: in expansion of macro 'PKGCONF_TRACE' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1560:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:778:25: note: in expansion of macro 'PKGCONF_TRACE' # 263| *bptr++ = *i; # 264| } else # 265|-> *bptr++ = *i; # 266| } # 267| Error: GCC_ANALYZER_WARNING (CWE-476): [#def16] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c: scope_hint: In function 'pkgconf_pkg_new_from_file' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:423:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'pkg' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1649:17: note: in expansion of macro 'PKGCONF_TRACE' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1560:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:778: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): [#def17] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:456:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'strdup(idptr)' where non-null expected pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1649:17: note: in expansion of macro 'PKGCONF_TRACE' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1560:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:778:25: note: in expansion of macro 'PKGCONF_TRACE' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/stdinc.h:25: included_from: Included from here. pkgconf-2.3.0-build/pkgconf-2.3.0/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): [#def18] pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c: scope_hint: In function 'pkgconf_pkg_unref' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:593:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'pkg' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1649:17: note: in expansion of macro 'PKGCONF_TRACE' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1560:9: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/libpkgconf/pkg.c:1567:17: note: in expansion of macro 'PKGCONF_FOREACH_LIST_ENTRY' pkgconf-2.3.0-build/pkgconf-2.3.0/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|
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-206.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | pkgconf-2.3.0-1.fc42 |
store-results-to | /tmp/tmpr_b90e59/pkgconf-2.3.0-1.fc42.tar.xz |
time-created | 2024-11-13 02:23:59 |
time-finished | 2024-11-13 02:25:25 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpr_b90e59/pkgconf-2.3.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpr_b90e59/pkgconf-2.3.0-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |