libtalloc-2.4.2-3.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/getifaddrs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def2]
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/os2_delete.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/os2_delete.c: scope_hint: In function ‘test_readdir_os2_delete’
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/os2_delete.c:114:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir("test.dir")’ where non-null expected
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/os2_delete.c:11: included_from: Included from here.
/usr/include/dirent.h:164:23: note: argument 1 of ‘readdir’ must be non-null
# 112|
# 113| /* skip past . and .. */
# 114|-> de = readdir(d);
# 115| strcmp(de->d_name, ".") == 0 || FAILED("match .");
# 116| de = readdir(d);
Error: CPPCHECK_WARNING: [#def4]
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/strptime.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/testsuite.c: scope_hint: In function ‘test_strdup’
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/testsuite.c:172:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/replace.h:176: included_from: Included from here.
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/testsuite.c:26: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null
# 170| x = strdup("bla");
# 171|
# 172|-> cmp = strcmp("bla", x);
# 173| if (cmp != 0) {
# 174| printf("failure: strdup [\nfailed: expected \"bla\", got \"%s\"\n]\n",
Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/testsuite.c: scope_hint: In function ‘test_strndup’
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/testsuite.c:271:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘x’
# 269| printf("test: strndup\n");
# 270| x = strndup("bla", 0);
# 271|-> cmp = strcmp(x, "");
# 272| free(x);
# 273| if (cmp != 0) {
Error: GCC_ANALYZER_WARNING (CWE-688): [#def7]
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/testsuite.c:279:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
# 277|
# 278| x = strndup("bla", 2);
# 279|-> cmp = strcmp(x, "bl");
# 280| free(x);
# 281| if (cmp != 0) {
Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/testsuite.c: scope_hint: In function ‘test_closefrom’
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/tests/testsuite.c:1114:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
# 1112| if (fd >= 1000) {
# 1113| printf("fd=%d\n", fd);
# 1114|-> closefrom(3);
# 1115| return false;
# 1116| }
Error: CPPCHECK_WARNING: [#def9]
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘talloc_parent_chunk’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:581:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tc’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘talloc_parent_chunk’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:33: included_from: Included from here.
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:757:13: note: in expansion of macro ‘unlikely’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:761:13: note: in expansion of macro ‘likely’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘talloc_parent_chunk’
/usr/include/bits/types/stack_t.h:23: included_from: Included from here.
/usr/include/signal.h:313: included_from: Included from here.
/usr/include/sys/param.h:28: included_from: Included from here.
libtalloc-2.4.2-build/talloc-2.4.2/lib/replace/replace.h:663: included_from: Included from here.
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘talloc_parent_chunk’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘talloc_parent_chunk’
# 579|
# 580| tc = talloc_chunk_from_ptr(ptr);
# 581|-> while (tc->prev) tc=tc->prev;
# 582|
# 583| return tc->parent;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘__talloc_with_prefix’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:764:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tc’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘__talloc_with_prefix’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:757:13: note: in expansion of macro ‘unlikely’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:761:13: note: in expansion of macro ‘likely’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘__talloc_with_prefix’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘__talloc_with_prefix’
# 762| parent = talloc_chunk_from_ptr(context);
# 763|
# 764|-> if (parent->limit != NULL) {
# 765| limit = parent->limit;
# 766| }
Error: CLANG_WARNING: [#def12]
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:788:6: warning[unix.Malloc]: Potential leak of memory pointed to by 'ptr'
# 786| }
# 787| tcc = (union talloc_chunk_cast_u) { .ptr = ptr + prefix_len };
# 788|-> tc = tcc.chunk;
# 789| tc->flags = talloc_magic;
# 790| tc->pool = NULL;
Error: CPPCHECK_WARNING (CWE-401): [#def13]
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:793: error[memleak]: Memory leak: ptr
# 791|
# 792| talloc_memlimit_grow(limit, total_len);
# 793|-> }
# 794|
# 795| tc->limit = limit;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘_talloc_total_mem_internal’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:2130:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘_talloc_total_mem_internal’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:757:13: note: in expansion of macro ‘unlikely’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:761:13: note: in expansion of macro ‘likely’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘_talloc_total_mem_internal’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:1269:13: note: in expansion of macro ‘unlikely’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘_talloc_total_mem_internal’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘_talloc_total_mem_internal’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘_talloc_total_mem_internal’
# 2128| /* optimize in the memlimits case */
# 2129| if (type == TOTAL_MEM_LIMIT &&
# 2130|-> tc->limit != NULL &&
# 2131| tc->limit != old_limit &&
# 2132| tc->limit->parent == tc) {
Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:2136:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘_talloc_total_mem_internal’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘_talloc_total_mem_internal’
# 2134| }
# 2135|
# 2136|-> if (tc->flags & TALLOC_FLAG_LOOP) {
# 2137| return 0;
# 2138| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘talloc_report_depth_cb’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:2244:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘talloc_report_depth_cb’
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c: scope_hint: In function ‘talloc_report_depth_cb’
# 2242| tc = talloc_chunk_from_ptr(ptr);
# 2243|
# 2244|-> if (tc->flags & TALLOC_FLAG_LOOP) {
# 2245| return;
# 2246| }
Error: CLANG_WARNING: [#def17]
libtalloc-2.4.2-build/talloc-2.4.2/talloc.c:3069:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'limit'
# 3067| }
# 3068|
# 3069|-> return 0;
# 3070| }
Error: CPPCHECK_WARNING: [#def18]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def19]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:813:2: warning[deadcode.DeadStores]: Value stored to 'p1' is never read
# 811| CHECK_BLOCKS("realloc_fn", root, 2);
# 812| CHECK_SIZE("realloc_fn", root, 20);
# 813|-> p1 = talloc_realloc_fn(root, p1, 0);
# 814| CHECK_BLOCKS("realloc_fn", root, 1);
# 815| CHECK_SIZE("realloc_fn", root, 0);
Error: COMPILER_WARNING (CWE-477): [#def20]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c: scope_hint: In function ‘test_autofree’
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1282:9: warning[-Wdeprecated-declarations]: ‘talloc_autofree_context’ is deprecated
# 1282 | p = talloc_autofree_context();
# | ^
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:28: included_from: Included from here.
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1084:16: note: declared here
# 1084 | _PUBLIC_ void *talloc_autofree_context(void) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~~~~~
# 1280| printf("test: autofree\n# TALLOC AUTOFREE CONTEXT\n");
# 1281|
# 1282|-> p = talloc_autofree_context();
# 1283| talloc_free(p);
# 1284|
Error: COMPILER_WARNING (CWE-477): [#def21]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1285:9: warning[-Wdeprecated-declarations]: ‘talloc_autofree_context’ is deprecated
# 1285 | p = talloc_autofree_context();
# | ^
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1084:16: note: declared here
# 1084 | _PUBLIC_ void *talloc_autofree_context(void) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~~~~~
# 1283| talloc_free(p);
# 1284|
# 1285|-> p = talloc_autofree_context();
# 1286| talloc_free(p);
# 1287|
Error: CLANG_WARNING: [#def22]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1406:2: warning[deadcode.DeadStores]: Value stored to 'p1_2' is never read
# 1404| talloc_free(pool);
# 1405|
# 1406|-> p1_2 = p1;
# 1407|
# 1408| p1_2 = talloc_realloc_size(root, p1, 5 * 16);
Error: CLANG_WARNING: [#def23]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1422:2: warning[deadcode.DeadStores]: Value stored to 'p2_2' is never read
# 1420| talloc_free(p1_2);
# 1421|
# 1422|-> p2_2 = p2;
# 1423|
# 1424| /* now we should reclaim the full pool */
Error: COMPILER_WARNING (CWE-477): [#def24]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c: scope_hint: In function ‘test_memlimit’
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1628:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1628 | torture_assert("memlimit", talloc_set_memlimit(l1, 2048) == 0,
# | ^~~~~~~~~~~~~~
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~
# 1626|
# 1627| printf("==== talloc_set_memlimit(l1, 2048)\n");
# 1628|-> torture_assert("memlimit", talloc_set_memlimit(l1, 2048) == 0,
# 1629| "failed: setting memlimit should never fail\n");
# 1630|
Error: COMPILER_WARNING (CWE-477): [#def25]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1688:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1688 | torture_assert("memlimit", talloc_set_memlimit(l3, 1024) == 0,
# | ^~~~~~~~~~~~~~
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~
# 1686|
# 1687| printf("==== talloc_set_memlimit(l3, 1024)\n");
# 1688|-> torture_assert("memlimit", talloc_set_memlimit(l3, 1024) == 0,
# 1689| "failed: setting memlimit should never fail\n");
# 1690|
Error: COMPILER_WARNING (CWE-477): [#def26]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1701:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1701 | torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
# | ^~~~~~~~~~~~~~
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~
# 1699|
# 1700| printf("==== talloc_set_memlimit(l4, 512)\n");
# 1701|-> torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
# 1702| "failed: setting memlimit should never fail\n");
# 1703|
Error: COMPILER_WARNING (CWE-477): [#def27]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1735:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1735 | torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
# | ^~~~~~~~~~~~~~
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~
# 1733|
# 1734| printf("==== talloc_set_memlimit(l4, 512)\n");
# 1735|-> torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
# 1736| "failed: setting memlimit should never fail\n");
# 1737|
Error: COMPILER_WARNING (CWE-477): [#def28]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1768:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1768 | talloc_set_memlimit(pool, 10*1024);
# | ^~~~~~~~~~~~~~~~~~~
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~
# 1766|
# 1767| printf("==== talloc_set_memlimit(pool, 10*1024)\n");
# 1768|-> talloc_set_memlimit(pool, 10*1024);
# 1769| for (i = 0; i < 9; i++) {
# 1770| printf("==== talloc_size(pool, 1024) %i/10\n", i + 1);
Error: COMPILER_WARNING (CWE-477): [#def29]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1821:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1821 | talloc_set_memlimit(pool, 11*1024);
# | ^~~~~~~~~~~~~~~~~~~
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~
# 1819| /* Increase the memlimit */
# 1820| printf("==== talloc_set_memlimit(pool, 11*1024)\n");
# 1821|-> talloc_set_memlimit(pool, 11*1024);
# 1822|
# 1823| /* The final realloc should still fail
Error: COMPILER_WARNING (CWE-477): [#def30]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1833:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1833 | talloc_set_memlimit(pool, 21*1024);
# | ^~~~~~~~~~~~~~~~~~~
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~
# 1831|
# 1832| printf("==== talloc_set_memlimit(pool, 21*1024)\n");
# 1833|-> talloc_set_memlimit(pool, 21*1024);
# 1834|
# 1835| /* There's now sufficient space to move the chunk out of the pool */
Error: COMPILER_WARNING (CWE-477): [#def31]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1871:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1871 | talloc_set_memlimit(pool, 1024);
# | ^~~~~~~~~~~~~~~~~~~
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~
# 1869|
# 1870| printf("==== talloc_set_memlimit(pool, 1024)\n");
# 1871|-> talloc_set_memlimit(pool, 1024);
# 1872|
# 1873| /* We should still be able to allocate up to the pool limit
Error: COMPILER_WARNING (CWE-477): [#def32]
libtalloc-2.4.2-build/talloc-2.4.2/testsuite.c:1892:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1892 | talloc_set_memlimit(pool, 10*1024);
# | ^~~~~~~~~~~~~~~~~~~
libtalloc-2.4.2-build/talloc-2.4.2/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
# | ^~~~~~~~~~~~~~~~~~~
# 1890|
# 1891| printf("==== talloc_set_memlimit(pool, 10*1024)\n");
# 1892|-> talloc_set_memlimit(pool, 10*1024);
# 1893|
# 1894| printf("==== talloc_size(pool, 1024)\n");
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-179.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | libtalloc-2.4.2-3.fc41 |
store-results-to | /tmp/tmp4o89i80p/libtalloc-2.4.2-3.fc41.tar.xz |
time-created | 2024-07-03 15:58:10 |
time-finished | 2024-07-03 15:59:56 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp4o89i80p/libtalloc-2.4.2-3.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp4o89i80p/libtalloc-2.4.2-3.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |