libtalloc-2.4.4-4.fc45

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
talloc-2.4.4/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.4/lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’
talloc-2.4.4/lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’
talloc-2.4.4/lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’
talloc-2.4.4/lib/replace/tests/os2_delete.c:109:12: branch_false: following ‘false’ branch...
talloc-2.4.4/lib/replace/tests/os2_delete.c:111:13: branch_false: ...to here
talloc-2.4.4/lib/replace/tests/os2_delete.c:111:13: acquire_memory: this call could return NULL
talloc-2.4.4/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: CPPCHECK_WARNING (CWE-476): [#def2]
talloc-2.4.4/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: GCC_ANALYZER_WARNING (CWE-688): [#def3]
talloc-2.4.4/lib/replace/tests/testsuite.c:172:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
talloc-2.4.4/lib/replace/tests/testsuite.c:170:13: acquire_memory: this call could return NULL
talloc-2.4.4/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-775): [#def4]
talloc-2.4.4/lib/replace/tests/testsuite.c:189:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
talloc-2.4.4/lib/replace/tests/testsuite.c:1174:6: enter_function: entry to ‘torture_local_replace’
talloc-2.4.4/lib/replace/tests/testsuite.c:1178:16: call_function: calling ‘test_strlcpy’ from ‘torture_local_replace’
talloc-2.4.4/lib/replace/tests/testsuite.c:1178:16: return_function: returning to ‘torture_local_replace’ from ‘test_strlcpy’
talloc-2.4.4/lib/replace/tests/testsuite.c:1222:16: call_function: calling ‘test_closefrom’ from ‘torture_local_replace’
#  187|   	setlinebuf(stdout);
#  188|   	printf("success: setlinebuf\n");
#  189|-> 	return true;
#  190|   }
#  191|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
talloc-2.4.4/lib/replace/tests/testsuite.c:271:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘x’
talloc-2.4.4/lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL
talloc-2.4.4/lib/replace/tests/testsuite.c:271:15: danger: ‘x’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/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): [#def6]
talloc-2.4.4/lib/replace/tests/testsuite.c:279:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
talloc-2.4.4/lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL
talloc-2.4.4/lib/replace/tests/testsuite.c:273:12: branch_false: following ‘false’ branch...
talloc-2.4.4/lib/replace/tests/testsuite.c:278:13: branch_false: ...to here
talloc-2.4.4/lib/replace/tests/testsuite.c:278:13: acquire_memory: this call could return NULL
talloc-2.4.4/lib/replace/tests/testsuite.c:279:15: danger: argument 1 (‘x’) from [(5)](sarif:/runs/0/results/3/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): [#def7]
talloc-2.4.4/lib/replace/tests/testsuite.c:1131:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
talloc-2.4.4/lib/replace/tests/testsuite.c:1102:19: branch_true: following ‘true’ branch (when ‘i != 100’)...
talloc-2.4.4/lib/replace/tests/testsuite.c:1103:22: branch_true: ...to here
talloc-2.4.4/lib/replace/tests/testsuite.c:1103:22: acquire_resource: opened here
talloc-2.4.4/lib/replace/tests/testsuite.c:1104:20: branch_false: following ‘false’ branch (when ‘fd != -1’)...
talloc-2.4.4/lib/replace/tests/testsuite.c:1112:20: branch_false: ...to here
talloc-2.4.4/lib/replace/tests/testsuite.c:1131:1: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1129|   
# 1130|   	return true;
# 1131|-> }
# 1132|   
# 1133|   static bool test_array_del_element(void)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
talloc-2.4.4/talloc.c:764:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tc’
talloc-2.4.4/talloc.c:2707:16: enter_function: entry to ‘talloc_vasprintf_append_buffer’
talloc-2.4.4/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: CPPCHECK_WARNING (CWE-401): [#def9]
talloc-2.4.4/talloc.c:793: error[memleak]: Memory leak: ptr
#  791|   
#  792|   		talloc_memlimit_grow(limit, total_len);
#  793|-> 	}
#  794|   
#  795|   	tc->limit = limit;

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-200.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibtalloc-2.4.4-4.fc45
store-results-to/tmp/tmpb8cdhiyy/libtalloc-2.4.4-4.fc45.tar.xz
time-created2026-08-03 17:56:25
time-finished2026-08-03 17:58:05
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpb8cdhiyy/libtalloc-2.4.4-4.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpb8cdhiyy/libtalloc-2.4.4-4.fc45.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9