Task #131771 - libtalloc-2.4.4-4.fc45/scan-results.err
back to task #131771download
Error: GCC_ANALYZER_WARNING (CWE-688):
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):
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):
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):
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):
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):
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):
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):
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):
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;