Task #130591 - added.err
back to task #130591download
Error: CPPCHECK_WARNING (CWE-476):
acl-2.4.0/libmisc/walk_tree.c:126: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: n
# 124| if (newname == NULL)
# 125| return NULL;
# 126|-> memcpy(n, dirname, dirlen);
# 127| n += dirlen;
# 128| memcpy(n, pathname, pathlen);
Error: GCC_ANALYZER_WARNING (CWE-401):
acl-2.4.0/tools/chacl.c:380:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopendir(openat(dirfd, fname, 196608))’
acl-2.4.0/tools/chacl.c:366:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/chacl.c:374:20: branch_false: ...to here
acl-2.4.0/tools/chacl.c:374:20: acquire_memory: allocated here
acl-2.4.0/tools/chacl.c:374:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/chacl.c:380:25: branch_false: ...to here
acl-2.4.0/tools/chacl.c:380:25: danger: ‘fdopendir(openat(dirfd, fname, 196608))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 378| }
# 379|
# 380|-> dname2 = malloc(strlen(dname) + strlen(fname) + 2);
# 381| if (dname2 == NULL) {
# 382| fprintf(stderr, _("%s: malloc failed: %s\n"),
Error: GCC_ANALYZER_WARNING (CWE-401):
acl-2.4.0/tools/getfacl.c:357:32: warning[-Wanalyzer-malloc-leak]: leak of ‘dacl_names’
acl-2.4.0/tools/getfacl.c:448:12: enter_function: entry to ‘do_print’
acl-2.4.0/tools/getfacl.c:471:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:483:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:491:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:493:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:493:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:500:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:500:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:510:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:510:12: branch_true: following ‘true’ branch...
acl-2.4.0/tools/getfacl.c:513:20: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:516:28: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:516:27: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:522:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:526:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:526:12: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:542:12: branch_true: following ‘true’ branch...
acl-2.4.0/tools/getfacl.c:543:21: branch_true: ...to here
acl-2.4.0/tools/getfacl.c:543:21: call_function: calling ‘do_show’ from ‘do_print’
# 355| acl = NULL;
# 356| if (ret < 0)
# 357|-> return ret;
# 358| }
# 359| dacl_mask[0] = '\0';
Error: GCC_ANALYZER_WARNING (CWE-457):
acl-2.4.0/tools/getfacl.c:386:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘acl_tag’
acl-2.4.0/tools/getfacl.c:448:12: enter_function: entry to ‘do_print’
acl-2.4.0/tools/getfacl.c:471:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:483:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:491:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:493:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:493:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:500:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:500:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:510:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:510:12: branch_true: following ‘true’ branch...
acl-2.4.0/tools/getfacl.c:513:20: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:516:28: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:516:27: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:522:13: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:526:12: branch_false: following ‘false’ branch...
acl-2.4.0/tools/getfacl.c:526:12: branch_false: ...to here
acl-2.4.0/tools/getfacl.c:542:12: branch_true: following ‘true’ branch...
acl-2.4.0/tools/getfacl.c:543:21: branch_true: ...to here
acl-2.4.0/tools/getfacl.c:543:21: call_function: calling ‘do_show’ from ‘do_print’
# 384| continue;
# 385| } else {
# 386|-> if (acl_tag == ACL_USER || acl_tag == ACL_GROUP) {
# 387| int id_cmp = 0;
# 388|
Error: CPPCHECK_WARNING (CWE-401):
acl-2.4.0/tools/setfacl.c:681: error[memleakOnRealloc]: Common realloc mistake: 'restore_args' nulled but not freed upon failure
# 679| mode = RESTORE_MODE;
# 680| opt_restore_count++;
# 681|-> restore_args = realloc(restore_args,
# 682| opt_restore_count * sizeof(*restore_args));
# 683| if (!restore_args) {