libtalloc-2.4.3-2.fc43

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
talloc-2.4.3/bin/default/../../lib/replace/tests/os2_delete.c:114:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir("test.dir")’ where non-null expected
talloc-2.4.3/bin/default/../../lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’
talloc-2.4.3/bin/default/../../lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’
talloc-2.4.3/bin/default/../../lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’
talloc-2.4.3/bin/default/../../lib/replace/tests/os2_delete.c:109:12: branch_false: following ‘false’ branch...
talloc-2.4.3/bin/default/../../lib/replace/tests/os2_delete.c:111:13: branch_false: ...to here
talloc-2.4.3/bin/default/../../lib/replace/tests/os2_delete.c:111:13: acquire_memory: this call could return NULL
talloc-2.4.3/bin/default/../../lib/replace/tests/os2_delete.c:114:14: danger: argument 1 (‘opendir("test.dir")’) from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
#  112|   
#  113|   	/* skip past . and .. */
#  114|-> 	de = readdir(d);
#  115|   	strcmp(de->d_name, ".") == 0 || FAILED("match .");
#  116|   	de = readdir(d);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def2]
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:172:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:170:13: acquire_memory: this call could return NULL
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:172:15: danger: argument 2 (‘x’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#  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): [#def3]
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:271:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘x’
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:271:15: danger: ‘x’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  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): [#def4]
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:279:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:273:12: branch_false: following ‘false’ branch...
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:278:13: branch_false: ...to here
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:278:13: acquire_memory: this call could return NULL
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:279:15: danger: argument 1 (‘x’) from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#  277|   
#  278|   	x = strndup("bla", 2);
#  279|-> 	cmp = strcmp(x, "bl");
#  280|   	free(x);
#  281|   	if (cmp != 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:1108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:1096:19: branch_true: following ‘true’ branch (when ‘i != 100’)...
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:1097:22: branch_true: ...to here
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:1097:22: acquire_resource: opened here
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:1098:20: branch_false: following ‘false’ branch (when ‘fd != -1’)...
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:1106:20: branch_false: ...to here
talloc-2.4.3/bin/default/../../lib/replace/tests/testsuite.c:1108:25: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1106|   		if (fd >= 1000) {
# 1107|   			printf("fd=%d\n", fd);
# 1108|-> 			closefrom(3);
# 1109|   			return false;
# 1110|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
talloc-2.4.3/bin/default/../../talloc.c:764:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tc’
talloc-2.4.3/bin/default/../../talloc.c:2707:16: enter_function: entry to ‘talloc_vasprintf_append_buffer’
talloc-2.4.3/bin/default/../../talloc.c:2712:24: call_function: calling ‘talloc_vasprintf’ from ‘talloc_vasprintf_append_buffer’
#  762|   		parent = talloc_chunk_from_ptr(context);
#  763|   
#  764|-> 		if (parent->limit != NULL) {
#  765|   			limit = parent->limit;
#  766|   		}

Error: COMPILER_WARNING (CWE-477): [#def7]
talloc-2.4.3/bin/default/../../testsuite.c:1334:9: warning[-Wdeprecated-declarations]: ‘talloc_autofree_context’ is deprecated
# 1332|   	printf("test: autofree\n# TALLOC AUTOFREE CONTEXT\n");
# 1333|   
# 1334|-> 	p = talloc_autofree_context();
# 1335|   	talloc_free(p);
# 1336|   

Error: COMPILER_WARNING (CWE-477): [#def8]
talloc-2.4.3/bin/default/../../testsuite.c:1337:9: warning[-Wdeprecated-declarations]: ‘talloc_autofree_context’ is deprecated
# 1335|   	talloc_free(p);
# 1336|   
# 1337|-> 	p = talloc_autofree_context();
# 1338|   	talloc_free(p);
# 1339|   

Error: COMPILER_WARNING (CWE-477): [#def9]
talloc-2.4.3/bin/default/../../testsuite.c:1680:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1678|   
# 1679|   	printf("==== talloc_set_memlimit(l1, 2048)\n");
# 1680|-> 	torture_assert("memlimit", talloc_set_memlimit(l1, 2048) == 0,
# 1681|   		"failed: setting memlimit should never fail\n");
# 1682|   

Error: COMPILER_WARNING (CWE-477): [#def10]
talloc-2.4.3/bin/default/../../testsuite.c:1740:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1738|   
# 1739|   	printf("==== talloc_set_memlimit(l3, 1024)\n");
# 1740|-> 	torture_assert("memlimit", talloc_set_memlimit(l3, 1024) == 0,
# 1741|   		"failed: setting memlimit should never fail\n");
# 1742|   

Error: COMPILER_WARNING (CWE-477): [#def11]
talloc-2.4.3/bin/default/../../testsuite.c:1753:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1751|   
# 1752|   	printf("==== talloc_set_memlimit(l4, 512)\n");
# 1753|-> 	torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
# 1754|   		"failed: setting memlimit should never fail\n");
# 1755|   

Error: COMPILER_WARNING (CWE-477): [#def12]
talloc-2.4.3/bin/default/../../testsuite.c:1787:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1785|   
# 1786|   	printf("==== talloc_set_memlimit(l4, 512)\n");
# 1787|-> 	torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
# 1788|   		"failed: setting memlimit should never fail\n");
# 1789|   

Error: COMPILER_WARNING (CWE-477): [#def13]
talloc-2.4.3/bin/default/../../testsuite.c:1820:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1818|   
# 1819|   	printf("==== talloc_set_memlimit(pool, 10*1024)\n");
# 1820|-> 	talloc_set_memlimit(pool, 10*1024);
# 1821|   	for (i = 0; i < 9; i++) {
# 1822|   		printf("==== talloc_size(pool, 1024) %i/10\n", i + 1);

Error: COMPILER_WARNING (CWE-477): [#def14]
talloc-2.4.3/bin/default/../../testsuite.c:1873:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1871|   	/* Increase the memlimit */
# 1872|   	printf("==== talloc_set_memlimit(pool, 11*1024)\n");
# 1873|-> 	talloc_set_memlimit(pool, 11*1024);
# 1874|   
# 1875|   	/* The final realloc should still fail

Error: COMPILER_WARNING (CWE-477): [#def15]
talloc-2.4.3/bin/default/../../testsuite.c:1885:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1883|   
# 1884|   	printf("==== talloc_set_memlimit(pool, 21*1024)\n");
# 1885|-> 	talloc_set_memlimit(pool, 21*1024);
# 1886|   
# 1887|   	/* There's now sufficient space to move the chunk out of the pool */

Error: COMPILER_WARNING (CWE-477): [#def16]
talloc-2.4.3/bin/default/../../testsuite.c:1923:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1921|   
# 1922|   	printf("==== talloc_set_memlimit(pool, 1024)\n");
# 1923|-> 	talloc_set_memlimit(pool, 1024);
# 1924|   
# 1925|   	/* We should still be able to allocate up to the pool limit

Error: COMPILER_WARNING (CWE-477): [#def17]
talloc-2.4.3/bin/default/../../testsuite.c:1944:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1942|   
# 1943|   	printf("==== talloc_set_memlimit(pool, 10*1024)\n");
# 1944|-> 	talloc_set_memlimit(pool, 10*1024);
# 1945|   
# 1946|   	printf("==== talloc_size(pool, 1024)\n");

Error: CPPCHECK_WARNING (CWE-476): [#def18]
talloc-2.4.3/lib/replace/tests/testsuite.c:172: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: x
#  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: CPPCHECK_WARNING (CWE-401): [#def19]
talloc-2.4.3/talloc.c:793: error[memleak]: Memory leak: ptr
#  791|   
#  792|   		talloc_memlimit_grow(limit, total_len);
#  793|-> 	}
#  794|   
#  795|   	tc->limit = limit;

Error: COMPILER_WARNING (CWE-477): [#def20]
talloc-2.4.3/testsuite.c: scope_hint: In function ‘test_autofree’
talloc-2.4.3/testsuite.c:1334:9: warning[-Wdeprecated-declarations]: ‘talloc_autofree_context’ is deprecated
# 1334 |         p = talloc_autofree_context();
#      |         ^
talloc-2.4.3/testsuite.c:28: included_from: Included from here.
talloc-2.4.3/talloc.h:1084:16: note: declared here
# 1084 | _PUBLIC_ void *talloc_autofree_context(void) _DEPRECATED_;
#      |                ^~~~~~~~~~~~~~~~~~~~~~~
# 1332|   	printf("test: autofree\n# TALLOC AUTOFREE CONTEXT\n");
# 1333|   
# 1334|-> 	p = talloc_autofree_context();
# 1335|   	talloc_free(p);
# 1336|   

Error: COMPILER_WARNING (CWE-477): [#def21]
talloc-2.4.3/testsuite.c:1337:9: warning[-Wdeprecated-declarations]: ‘talloc_autofree_context’ is deprecated
# 1337 |         p = talloc_autofree_context();
#      |         ^
talloc-2.4.3/talloc.h:1084:16: note: declared here
# 1084 | _PUBLIC_ void *talloc_autofree_context(void) _DEPRECATED_;
#      |                ^~~~~~~~~~~~~~~~~~~~~~~
# 1335|   	talloc_free(p);
# 1336|   
# 1337|-> 	p = talloc_autofree_context();
# 1338|   	talloc_free(p);
# 1339|   

Error: COMPILER_WARNING (CWE-477): [#def22]
talloc-2.4.3/testsuite.c: scope_hint: In function ‘test_memlimit’
talloc-2.4.3/testsuite.c:1680:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1680 |         torture_assert("memlimit", talloc_set_memlimit(l1, 2048) == 0,
#      |         ^~~~~~~~~~~~~~
talloc-2.4.3/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
#      |              ^~~~~~~~~~~~~~~~~~~
# 1678|   
# 1679|   	printf("==== talloc_set_memlimit(l1, 2048)\n");
# 1680|-> 	torture_assert("memlimit", talloc_set_memlimit(l1, 2048) == 0,
# 1681|   		"failed: setting memlimit should never fail\n");
# 1682|   

Error: COMPILER_WARNING (CWE-477): [#def23]
talloc-2.4.3/testsuite.c:1740:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1740 |         torture_assert("memlimit", talloc_set_memlimit(l3, 1024) == 0,
#      |         ^~~~~~~~~~~~~~
talloc-2.4.3/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
#      |              ^~~~~~~~~~~~~~~~~~~
# 1738|   
# 1739|   	printf("==== talloc_set_memlimit(l3, 1024)\n");
# 1740|-> 	torture_assert("memlimit", talloc_set_memlimit(l3, 1024) == 0,
# 1741|   		"failed: setting memlimit should never fail\n");
# 1742|   

Error: COMPILER_WARNING (CWE-477): [#def24]
talloc-2.4.3/testsuite.c:1753:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1753 |         torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
#      |         ^~~~~~~~~~~~~~
talloc-2.4.3/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
#      |              ^~~~~~~~~~~~~~~~~~~
# 1751|   
# 1752|   	printf("==== talloc_set_memlimit(l4, 512)\n");
# 1753|-> 	torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
# 1754|   		"failed: setting memlimit should never fail\n");
# 1755|   

Error: COMPILER_WARNING (CWE-477): [#def25]
talloc-2.4.3/testsuite.c:1787:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1787 |         torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
#      |         ^~~~~~~~~~~~~~
talloc-2.4.3/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
#      |              ^~~~~~~~~~~~~~~~~~~
# 1785|   
# 1786|   	printf("==== talloc_set_memlimit(l4, 512)\n");
# 1787|-> 	torture_assert("memlimit", talloc_set_memlimit(l4, 512) == 0,
# 1788|   		"failed: setting memlimit should never fail\n");
# 1789|   

Error: COMPILER_WARNING (CWE-477): [#def26]
talloc-2.4.3/testsuite.c:1820:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1820 |         talloc_set_memlimit(pool, 10*1024);
#      |         ^~~~~~~~~~~~~~~~~~~
talloc-2.4.3/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
#      |              ^~~~~~~~~~~~~~~~~~~
# 1818|   
# 1819|   	printf("==== talloc_set_memlimit(pool, 10*1024)\n");
# 1820|-> 	talloc_set_memlimit(pool, 10*1024);
# 1821|   	for (i = 0; i < 9; i++) {
# 1822|   		printf("==== talloc_size(pool, 1024) %i/10\n", i + 1);

Error: COMPILER_WARNING (CWE-477): [#def27]
talloc-2.4.3/testsuite.c:1873:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1873 |         talloc_set_memlimit(pool, 11*1024);
#      |         ^~~~~~~~~~~~~~~~~~~
talloc-2.4.3/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
#      |              ^~~~~~~~~~~~~~~~~~~
# 1871|   	/* Increase the memlimit */
# 1872|   	printf("==== talloc_set_memlimit(pool, 11*1024)\n");
# 1873|-> 	talloc_set_memlimit(pool, 11*1024);
# 1874|   
# 1875|   	/* The final realloc should still fail

Error: COMPILER_WARNING (CWE-477): [#def28]
talloc-2.4.3/testsuite.c:1885:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1885 |         talloc_set_memlimit(pool, 21*1024);
#      |         ^~~~~~~~~~~~~~~~~~~
talloc-2.4.3/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
#      |              ^~~~~~~~~~~~~~~~~~~
# 1883|   
# 1884|   	printf("==== talloc_set_memlimit(pool, 21*1024)\n");
# 1885|-> 	talloc_set_memlimit(pool, 21*1024);
# 1886|   
# 1887|   	/* There's now sufficient space to move the chunk out of the pool */

Error: COMPILER_WARNING (CWE-477): [#def29]
talloc-2.4.3/testsuite.c:1923:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1923 |         talloc_set_memlimit(pool, 1024);
#      |         ^~~~~~~~~~~~~~~~~~~
talloc-2.4.3/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
#      |              ^~~~~~~~~~~~~~~~~~~
# 1921|   
# 1922|   	printf("==== talloc_set_memlimit(pool, 1024)\n");
# 1923|-> 	talloc_set_memlimit(pool, 1024);
# 1924|   
# 1925|   	/* We should still be able to allocate up to the pool limit

Error: COMPILER_WARNING (CWE-477): [#def30]
talloc-2.4.3/testsuite.c:1944:9: warning[-Wdeprecated-declarations]: ‘talloc_set_memlimit’ is deprecated
# 1944 |         talloc_set_memlimit(pool, 10*1024);
#      |         ^~~~~~~~~~~~~~~~~~~
talloc-2.4.3/talloc.h:1951:14: note: declared here
# 1951 | _PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
#      |              ^~~~~~~~~~~~~~~~~~~
# 1942|   
# 1943|   	printf("==== talloc_set_memlimit(pool, 10*1024)\n");
# 1944|-> 	talloc_set_memlimit(pool, 10*1024);
# 1945|   
# 1946|   	printf("==== talloc_size(pool, 1024)\n");

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-13.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibtalloc-2.4.3-2.fc43
store-results-to/tmp/tmp5dxebaiy/libtalloc-2.4.3-2.fc43.tar.xz
time-created2025-04-25 14:10:18
time-finished2025-04-25 14:12:05
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp5dxebaiy/libtalloc-2.4.3-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp5dxebaiy/libtalloc-2.4.3-2.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9