Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] libcap-2.76/libcap/cap_alloc.c:71:5: warning[-Wanalyzer-malloc-leak]: leak of ‘raw_data’ libcap-2.76/libcap/cap_alloc.c:140:7: enter_function: entry to ‘cap_dup’ libcap-2.76/libcap/cap_alloc.c:144:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_alloc.c:150:14: call_function: calling ‘cap_init’ from ‘cap_dup’ # 69| result = &raw_data->u.set; # 70| result->head.version = _LIBCAP_CAPABILITY_VERSION; # 71|-> capget(&result->head, NULL); /* load the kernel-capability version */ # 72| # 73| switch (result->head.version) { Error: CPPCHECK_WARNING (CWE-401): [#def2] libcap-2.76/libcap/cap_alloc.c:173: error[memleak]: Memory leak: base # 171| base->magic = CAP_IAB_MAGIC; # 172| base->size = sizeof(struct _cap_alloc_s); # 173|-> return &base->u.iab; # 174| } # 175| Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] libcap-2.76/libcap/cap_alloc.c:173:12: warning[-Wanalyzer-malloc-leak]: leak of ‘base’ libcap-2.76/libcap/cap_alloc.c:166:33: acquire_memory: allocated here libcap-2.76/libcap/cap_alloc.c:167:8: branch_false: following ‘false’ branch (when ‘base’ is non-NULL)... libcap-2.76/libcap/cap_alloc.c:171:5: branch_false: ...to here libcap-2.76/libcap/cap_alloc.c:173:12: danger: ‘base’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 171| base->magic = CAP_IAB_MAGIC; # 172| base->size = sizeof(struct _cap_alloc_s); # 173|-> return &base->u.iab; # 174| } # 175| Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] libcap-2.76/libcap/cap_alloc.c:226:5: warning[-Wanalyzer-malloc-leak]: leak of ‘data’ libcap-2.76/libcap/cap_alloc.c:215:33: acquire_memory: allocated here libcap-2.76/libcap/cap_alloc.c:216:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)... libcap-2.76/libcap/cap_alloc.c:220:5: branch_false: ...to here libcap-2.76/libcap/cap_alloc.c:226:5: danger: ‘data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) # 224| attr->arg0 = arg0; # 225| attr->argv = argv; # 226|-> attr->envp = envp; # 227| return attr; # 228| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] libcap-2.76/libcap/cap_alloc.c:248:5: warning[-Wanalyzer-malloc-leak]: leak of ‘data’ libcap-2.76/libcap/cap_alloc.c:239:33: acquire_memory: allocated here libcap-2.76/libcap/cap_alloc.c:240:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)... libcap-2.76/libcap/cap_alloc.c:244:5: branch_false: ...to here libcap-2.76/libcap/cap_alloc.c:248:5: danger: ‘data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 246| # 247| struct cap_launch_s *attr = &data->u.launcher; # 248|-> attr->custom_setup_fn = callback_fn; # 249| return attr; # 250| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def6] libcap-2.76/libcap/cap_proc.c:98:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1047:7: enter_function: entry to ‘cap_launch’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1075:9: call_function: calling ‘_cap_launch’ from ‘cap_launch’ # 96| { # 97| if (_libcap_overrode_syscalls) { # 98|-> return sc->three(SYS_capset, (long int) header, (long int) data, 0); # 99| } # 100| return capset(header, data); Error: GCC_ANALYZER_WARNING (CWE-775): [#def7] libcap-2.76/libcap/cap_proc.c:100:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1047:7: enter_function: entry to ‘cap_launch’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1075:9: call_function: calling ‘_cap_launch’ from ‘cap_launch’ # 98| return sc->three(SYS_capset, (long int) header, (long int) data, 0); # 99| } # 100|-> return capset(header, data); # 101| } # 102| Error: GCC_ANALYZER_WARNING (CWE-775): [#def8] libcap-2.76/libcap/cap_proc.c:108:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1047:7: enter_function: entry to ‘cap_launch’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1075:9: call_function: calling ‘_cap_launch’ from ‘cap_launch’ # 106| if (_libcap_overrode_syscalls) { # 107| int result; # 108|-> result = sc->three(SYS_prctl, pr_cmd, arg1, arg2); # 109| if (result >= 0) { # 110| return result; Error: GCC_ANALYZER_WARNING (CWE-775): [#def9] libcap-2.76/libcap/cap_proc.c:142:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1047:7: enter_function: entry to ‘cap_launch’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1075:9: call_function: calling ‘_cap_launch’ from ‘cap_launch’ # 140| # 141| /* allocate a new capability set */ # 142|-> result = cap_init(); # 143| if (result) { # 144| _cap_debug("getting current process' capabilities"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def10] libcap-2.76/libcap/cap_proc.c:147:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1047:7: enter_function: entry to ‘cap_launch’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1075:9: call_function: calling ‘_cap_launch’ from ‘cap_launch’ # 145| # 146| /* fill the capability sets via a system call */ # 147|-> if (capget(&result->head, &result->u[0].set)) { # 148| cap_free(result); # 149| result = NULL; Error: GCC_ANALYZER_WARNING (CWE-775): [#def11] libcap-2.76/libcap/cap_proc.c:148:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1047:7: enter_function: entry to ‘cap_launch’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1075:9: call_function: calling ‘_cap_launch’ from ‘cap_launch’ # 146| /* fill the capability sets via a system call */ # 147| if (capget(&result->head, &result->u[0].set)) { # 148|-> cap_free(result); # 149| result = NULL; # 150| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def12] libcap-2.76/libcap/cap_proc.c:560:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1047:7: enter_function: entry to ‘cap_launch’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1075:9: call_function: calling ‘_cap_launch’ from ‘cap_launch’ # 558| } # 559| # 560|-> (void) cap_set_flag(working, CAP_EFFECTIVE, # 561| 1, raise_cap_setuid, CAP_SET); # 562| /* Error: GCC_ANALYZER_WARNING (CWE-775): [#def13] libcap-2.76/libcap/cap_proc.c:980:34: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1047:7: enter_function: entry to ‘cap_launch’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1075:9: call_function: calling ‘_cap_launch’ from ‘cap_launch’ # 978| int my_errno; # 979| # 980|-> if (attr->custom_setup_fn && attr->custom_setup_fn(detail)) { # 981| goto defer; # 982| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def14] libcap-2.76/libcap/cap_proc.c:1073:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[0]’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1073:9: danger: ‘ps[0]’ leaks here # 1071| # 1072| if (!child) { # 1073|-> close(ps[0]); # 1074| prctl(PR_SET_NAME, "cap-launcher", 0, 0, 0); # 1075| _cap_launch(ps[1], attr, detail); Error: GCC_ANALYZER_WARNING (CWE-775): [#def15] libcap-2.76/libcap/cap_proc.c:1073:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_true: following ‘true’ branch (when ‘child == 0’)... libcap-2.76/libcap/cap_proc.c:1073:9: branch_true: ...to here libcap-2.76/libcap/cap_proc.c:1073:9: danger: ‘ps[1]’ leaks here # 1071| # 1072| if (!child) { # 1073|-> close(ps[0]); # 1074| prctl(PR_SET_NAME, "cap-launcher", 0, 0, 0); # 1075| _cap_launch(ps[1], attr, detail); Error: GCC_ANALYZER_WARNING (CWE-775): [#def16] libcap-2.76/libcap/cap_proc.c:1081:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[0]’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_false: following ‘false’ branch (when ‘child != 0’)... libcap-2.76/libcap/cap_proc.c:1080:5: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1081:5: danger: ‘ps[0]’ leaks here # 1079| /* child has its own copy, and parent no longer needs it locked. */ # 1080| _cap_mu_unlock(&attr->mutex); # 1081|-> close(ps[1]); # 1082| if (child < 0) { # 1083| goto defer; Error: GCC_ANALYZER_WARNING (CWE-775): [#def17] libcap-2.76/libcap/cap_proc.c:1081:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[1]’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_false: following ‘false’ branch (when ‘child != 0’)... libcap-2.76/libcap/cap_proc.c:1080:5: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1081:5: danger: ‘ps[1]’ leaks here # 1079| /* child has its own copy, and parent no longer needs it locked. */ # 1080| _cap_mu_unlock(&attr->mutex); # 1081|-> close(ps[1]); # 1082| if (child < 0) { # 1083| goto defer; Error: GCC_ANALYZER_WARNING (CWE-775): [#def18] libcap-2.76/libcap/cap_proc.c:1099:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[0]’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_false: following ‘false’ branch (when ‘child != 0’)... libcap-2.76/libcap/cap_proc.c:1080:5: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1082:8: branch_false: following ‘false’ branch (when ‘child >= 0’)... branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1093:12: branch_false: following ‘false’ branch (when ‘n != 0’)... libcap-2.76/libcap/cap_proc.c:1096:12: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1099:9: danger: ‘ps[0]’ leaks here # 1097| continue; # 1098| } # 1099|-> waitpid(child, &ignored, 0); # 1100| child = -1; # 1101| my_errno = ECHILD; Error: GCC_ANALYZER_WARNING (CWE-775): [#def19] libcap-2.76/libcap/cap_proc.c:1106:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ps[0]’ libcap-2.76/libcap/cap_proc.c:1052:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1065:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_proc.c:1069:13: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1072:8: branch_false: following ‘false’ branch (when ‘child != 0’)... libcap-2.76/libcap/cap_proc.c:1080:5: branch_false: ...to here libcap-2.76/libcap/cap_proc.c:1106:5: danger: ‘ps[0]’ leaks here # 1104| # 1105| defer: # 1106|-> close(ps[0]); # 1107| errno = my_errno; # 1108| return child; Error: GCC_ANALYZER_WARNING (CWE-775): [#def20] libcap-2.76/libcap/cap_text.c:72:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’ libcap-2.76/libcap/cap_text.c:720:11: enter_function: entry to ‘cap_iab_get_pid’ libcap-2.76/libcap/cap_text.c:731:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:734:12: branch_false: ...to here libcap-2.76/libcap/cap_text.c:734:12: acquire_resource: opened here libcap-2.76/libcap/cap_text.c:736:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:740:11: branch_false: ...to here libcap-2.76/libcap/cap_text.c:742:8: branch_true: following ‘true’ branch... branch_true: ...to here libcap-2.76/libcap/cap_text.c:743:16: branch_true: following ‘true’ branch... libcap-2.76/libcap/cap_text.c:744:17: branch_true: ...to here libcap-2.76/libcap/cap_text.c:744:16: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:747:17: branch_false: ...to here libcap-2.76/libcap/cap_text.c:747:16: branch_true: following ‘true’ branch... libcap-2.76/libcap/cap_text.c:748:41: branch_true: ...to here libcap-2.76/libcap/cap_text.c:748:23: call_function: calling ‘_parse_vec_string’ from ‘cap_iab_get_pid’ # 70| { # 71| unsigned n; # 72|-> cap_value_t cmb = cap_max_bits(); # 73| for (n = blks; n--; ) { # 74| unsigned base = 32*n; Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] libcap-2.76/libcap/cap_text.c:72:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’ libcap-2.76/libcap/cap_text.c:720:11: enter_function: entry to ‘cap_iab_get_pid’ libcap-2.76/libcap/cap_text.c:731:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:734:12: branch_false: ...to here libcap-2.76/libcap/cap_text.c:734:12: acquire_memory: allocated here libcap-2.76/libcap/cap_text.c:736:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:740:11: branch_false: ...to here libcap-2.76/libcap/cap_text.c:742:8: branch_true: following ‘true’ branch... branch_true: ...to here libcap-2.76/libcap/cap_text.c:743:16: branch_true: following ‘true’ branch... libcap-2.76/libcap/cap_text.c:744:17: branch_true: ...to here libcap-2.76/libcap/cap_text.c:744:16: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:747:17: branch_false: ...to here libcap-2.76/libcap/cap_text.c:747:16: branch_true: following ‘true’ branch... libcap-2.76/libcap/cap_text.c:748:41: branch_true: ...to here libcap-2.76/libcap/cap_text.c:748:23: call_function: calling ‘_parse_vec_string’ from ‘cap_iab_get_pid’ # 70| { # 71| unsigned n; # 72|-> cap_value_t cmb = cap_max_bits(); # 73| for (n = blks; n--; ) { # 74| unsigned base = 32*n; Error: GCC_ANALYZER_WARNING (CWE-775): [#def22] libcap-2.76/libcap/cap_text.c:740:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’ libcap-2.76/libcap/cap_text.c:731:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:734:12: branch_false: ...to here libcap-2.76/libcap/cap_text.c:734:12: acquire_resource: opened here libcap-2.76/libcap/cap_text.c:736:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:740:11: branch_false: ...to here libcap-2.76/libcap/cap_text.c:740:11: danger: ‘fopen(path, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) # 738| } # 739| # 740|-> iab = cap_iab_init(); # 741| uint ok = 0; # 742| if (iab != NULL) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] libcap-2.76/libcap/cap_text.c:740:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’ libcap-2.76/libcap/cap_text.c:731:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:734:12: branch_false: ...to here libcap-2.76/libcap/cap_text.c:734:12: acquire_memory: allocated here libcap-2.76/libcap/cap_text.c:736:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:740:11: branch_false: ...to here libcap-2.76/libcap/cap_text.c:740:11: danger: ‘fopen(path, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) # 738| } # 739| # 740|-> iab = cap_iab_init(); # 741| uint ok = 0; # 742| if (iab != NULL) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def24] libcap-2.76/libcap/cap_text.c:765:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’ libcap-2.76/libcap/cap_text.c:731:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:734:12: branch_false: ...to here libcap-2.76/libcap/cap_text.c:734:12: acquire_resource: opened here libcap-2.76/libcap/cap_text.c:736:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:740:11: branch_false: ...to here libcap-2.76/libcap/cap_text.c:765:9: danger: ‘fopen(path, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2) # 763| } # 764| if (ok != (LIBCAP_IAB_IA_FLAG | LIBCAP_IAB_NB_FLAG)) { # 765|-> cap_free(iab); # 766| iab = NULL; # 767| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] libcap-2.76/libcap/cap_text.c:765:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’ libcap-2.76/libcap/cap_text.c:731:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:734:12: branch_false: ...to here libcap-2.76/libcap/cap_text.c:734:12: acquire_memory: allocated here libcap-2.76/libcap/cap_text.c:736:8: branch_false: following ‘false’ branch... libcap-2.76/libcap/cap_text.c:740:11: branch_false: ...to here libcap-2.76/libcap/cap_text.c:765:9: danger: ‘fopen(path, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2) # 763| } # 764| if (ok != (LIBCAP_IAB_IA_FLAG | LIBCAP_IAB_NB_FLAG)) { # 765|-> cap_free(iab); # 766| iab = NULL; # 767| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] libcap-2.76/libcap/execable.c:40:1: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’ libcap-2.76/libcap/execable.c:40:1: enter_function: entry to ‘__so_start’ libcap-2.76/libcap/execable.c:40:1: call_function: calling ‘__execable_parse_args’ from ‘__so_start’ libcap-2.76/libcap/execable.c:40:1: return_function: returning to ‘__so_start’ from ‘__execable_parse_args’ libcap-2.76/libcap/execable.c:40:1: danger: ‘argv’ leaks here; was allocated at [(15)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/14) # 38| } # 39| # 40|-> SO_MAIN(int argc, char **argv) # 41| { # 42| int i; Error: GCC_ANALYZER_WARNING (CWE-775): [#def27] libcap-2.76/libcap/execable.h:51:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/self/cmdline", "rb")’ libcap-2.76/libcap/execable.h:44:15: acquire_resource: opened here libcap-2.76/libcap/execable.h:45:8: branch_true: following ‘true’ branch... branch_true: ...to here libcap-2.76/libcap/execable.h:50:16: branch_true: following ‘true’ branch (when ‘new_mem’ is NULL)... libcap-2.76/libcap/execable.h:51:17: branch_true: ...to here libcap-2.76/libcap/execable.h:51:17: danger: ‘fopen("/proc/self/cmdline", "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 49| char *new_mem = realloc(mem, size+1); # 50| if (new_mem == NULL) { # 51|-> perror("unable to parse arguments"); # 52| fclose(f); # 53| if (mem != NULL) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] libcap-2.76/libcap/execable.h:51:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/self/cmdline", "rb")’ libcap-2.76/libcap/execable.h:44:15: acquire_memory: allocated here libcap-2.76/libcap/execable.h:45:8: branch_true: following ‘true’ branch... branch_true: ...to here libcap-2.76/libcap/execable.h:50:16: branch_true: following ‘true’ branch (when ‘new_mem’ is NULL)... libcap-2.76/libcap/execable.h:51:17: branch_true: ...to here libcap-2.76/libcap/execable.h:51:17: danger: ‘fopen("/proc/self/cmdline", "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 49| char *new_mem = realloc(mem, size+1); # 50| if (new_mem == NULL) { # 51|-> perror("unable to parse arguments"); # 52| fclose(f); # 53| if (mem != NULL) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] libcap-2.76/libcap/execable.h:51:17: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’ libcap-2.76/libcap/execable.h:45:8: branch_true: following ‘true’ branch... branch_true: ...to here libcap-2.76/libcap/execable.h:50:16: branch_false: following ‘false’ branch (when ‘new_mem’ is non-NULL)... libcap-2.76/libcap/execable.h:59:23: branch_false: ...to here libcap-2.76/libcap/execable.h:60:16: branch_false: following ‘false’ branch (when ‘size <= offset’)... libcap-2.76/libcap/execable.h:48:26: branch_false: ...to here libcap-2.76/libcap/execable.h:50:16: branch_true: following ‘true’ branch (when ‘new_mem’ is NULL)... libcap-2.76/libcap/execable.h:51:17: branch_true: ...to here libcap-2.76/libcap/execable.h:51:17: danger: ‘mem’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) # 49| char *new_mem = realloc(mem, size+1); # 50| if (new_mem == NULL) { # 51|-> perror("unable to parse arguments"); # 52| fclose(f); # 53| if (mem != NULL) { Error: GCC_ANALYZER_WARNING (CWE-617): [#def30] libcap-2.76/libcap/execable.h:56:17: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion libcap-2.76/libcap/execable.h:45:8: branch_true: following ‘true’ branch... branch_true: ...to here libcap-2.76/libcap/execable.h:50:16: branch_false: following ‘false’ branch (when ‘new_mem’ is non-NULL)... libcap-2.76/libcap/execable.h:59:23: branch_false: ...to here libcap-2.76/libcap/execable.h:60:16: branch_false: following ‘false’ branch (when ‘size <= offset’)... libcap-2.76/libcap/execable.h:48:26: branch_false: ...to here libcap-2.76/libcap/execable.h:50:16: branch_true: following ‘true’ branch (when ‘new_mem’ is NULL)... libcap-2.76/libcap/execable.h:51:17: branch_true: ...to here libcap-2.76/libcap/execable.h:53:20: branch_true: following ‘true’ branch (when ‘mem’ is non-NULL)... libcap-2.76/libcap/execable.h:54:21: branch_true: ...to here libcap-2.76/libcap/execable.h:56:17: danger: treating ‘exit’ as an assertion failure handler due to ‘__attribute__((__noreturn__))’ # 54| free(mem); # 55| } # 56|-> exit(1); # 57| } # 58| mem = new_mem; Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] libcap-2.76/libcap/execable.h:72:13: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’ libcap-2.76/libcap/execable.h:45:8: branch_true: following ‘true’ branch... branch_true: ...to here libcap-2.76/libcap/execable.h:50:16: branch_false: following ‘false’ branch (when ‘new_mem’ is non-NULL)... libcap-2.76/libcap/execable.h:59:23: branch_false: ...to here libcap-2.76/libcap/execable.h:60:16: branch_false: following ‘false’ branch (when ‘size <= offset’)... libcap-2.76/libcap/execable.h:48:26: branch_false: ...to here libcap-2.76/libcap/execable.h:50:16: branch_false: following ‘false’ branch (when ‘new_mem’ is non-NULL)... libcap-2.76/libcap/execable.h:59:23: branch_false: ...to here libcap-2.76/libcap/execable.h:60:16: branch_true: following ‘true’ branch (when ‘size > offset’)... libcap-2.76/libcap/execable.h:62:20: branch_true: ...to here libcap-2.76/libcap/execable.h:71:12: branch_true: following ‘true’ branch (when ‘argv’ is NULL)... libcap-2.76/libcap/execable.h:72:13: branch_true: ...to here libcap-2.76/libcap/execable.h:72:13: danger: ‘mem’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2) # 70| argv = calloc(argc+1, sizeof(char *)); # 71| if (argv == NULL) { # 72|-> perror("failed to allocate memory for argv"); # 73| free(mem); # 74| exit(1); Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] libcap-2.76/libcap/execable.h:72:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_mem’ libcap-2.76/libcap/execable.h:45:8: branch_true: following ‘true’ branch... branch_true: ...to here libcap-2.76/libcap/execable.h:50:16: branch_false: following ‘false’ branch (when ‘new_mem’ is non-NULL)... libcap-2.76/libcap/execable.h:59:23: branch_false: ...to here libcap-2.76/libcap/execable.h:60:16: branch_true: following ‘true’ branch (when ‘size > offset’)... libcap-2.76/libcap/execable.h:62:20: branch_true: ...to here libcap-2.76/libcap/execable.h:67:36: branch_false: following ‘false’ branch (when ‘p < new_mem’)... libcap-2.76/libcap/execable.h:70:23: branch_false: ...to here libcap-2.76/libcap/execable.h:71:12: branch_true: following ‘true’ branch (when ‘argv’ is NULL)... libcap-2.76/libcap/execable.h:72:13: branch_true: ...to here libcap-2.76/libcap/execable.h:72:13: danger: ‘new_mem’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2) # 70| argv = calloc(argc+1, sizeof(char *)); # 71| if (argv == NULL) { # 72|-> perror("failed to allocate memory for argv"); # 73| free(mem); # 74| exit(1); Error: GCC_ANALYZER_WARNING (CWE-401): [#def33] libcap-2.76/libcap/execable.h:83:1: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’ libcap-2.76/libcap/execable.c:40:1: enter_function: entry to ‘__so_start’ libcap-2.76/libcap/execable.c:40:1: call_function: calling ‘__execable_parse_args’ from ‘__so_start’ # 81| *argc_p = argc; # 82| *argv_p = argv; # 83|-> } # 84| # 85| /* Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] libcap-2.76/libcap/execable.h:83:1: warning[-Wanalyzer-malloc-leak]: leak of ‘new_mem’ libcap-2.76/libcap/execable.c:40:1: enter_function: entry to ‘__so_start’ libcap-2.76/libcap/execable.c:40:1: call_function: calling ‘__execable_parse_args’ from ‘__so_start’ # 81| *argc_p = argc; # 82| *argv_p = argv; # 83|-> } # 84| # 85| /* Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] libcap-2.76/pam_cap/pam_cap.c:78:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ /usr/include/security/pam_modules.h:34:5: enter_function: entry to ‘pam_sm_authenticate’ libcap-2.76/pam_cap/pam_cap.c:413:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:419:9: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:419:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:425:8: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:425:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:432:44: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:431:17: call_function: calling ‘read_capabilities_for_user’ from ‘pam_sm_authenticate’ # 76| int g_n = 0, i; # 77| for (i = 0; i < ngrps; i++) { # 78|-> const struct group *g = getgrgid(grps[i]); # 79| if (g == NULL) { # 80| continue; Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] libcap-2.76/pam_cap/pam_cap.c:78:33: warning[-Wanalyzer-malloc-leak]: leak of ‘groups’ /usr/include/security/pam_modules.h:34:5: enter_function: entry to ‘pam_sm_authenticate’ libcap-2.76/pam_cap/pam_cap.c:413:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:419:9: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:419:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:425:8: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:425:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:432:44: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:431:17: call_function: calling ‘read_capabilities_for_user’ from ‘pam_sm_authenticate’ # 76| int g_n = 0, i; # 77| for (i = 0; i < ngrps; i++) { # 78|-> const struct group *g = getgrgid(grps[i]); # 79| if (g == NULL) { # 80| continue; Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] libcap-2.76/pam_cap/pam_cap.c:306:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_caps’ /usr/include/security/pam_modules.h:36:5: enter_function: entry to ‘pam_sm_setcred’ libcap-2.76/pam_cap/pam_cap.c:469:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:474:5: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:477:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:483:14: call_function: calling ‘set_capabilities’ from ‘pam_sm_setcred’ # 304| /* clearing CAP_INHERITABLE will also clear the ambient caps, # 305| * but for legacy reasons we do not alter the bounding set. */ # 306|-> cap_clear_flag(cap_s, CAP_INHERITABLE); # 307| if (!cap_set_proc(cap_s)) { # 308| ok = 1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] libcap-2.76/pam_cap/pam_cap.c:307:14: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_caps’ /usr/include/security/pam_modules.h:36:5: enter_function: entry to ‘pam_sm_setcred’ libcap-2.76/pam_cap/pam_cap.c:469:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:474:5: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:477:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:483:14: call_function: calling ‘set_capabilities’ from ‘pam_sm_setcred’ # 305| * but for legacy reasons we do not alter the bounding set. */ # 306| cap_clear_flag(cap_s, CAP_INHERITABLE); # 307|-> if (!cap_set_proc(cap_s)) { # 308| ok = 1; # 309| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def39] libcap-2.76/pam_cap/pam_cap.c:313:11: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_caps’ /usr/include/security/pam_modules.h:36:5: enter_function: entry to ‘pam_sm_setcred’ libcap-2.76/pam_cap/pam_cap.c:469:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:474:5: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:477:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:483:14: call_function: calling ‘set_capabilities’ from ‘pam_sm_setcred’ # 311| } # 312| # 313|-> iab = cap_iab_from_text(conf_caps); # 314| if (iab == NULL) { # 315| D(("unable to parse the IAB [%s] value", conf_caps)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] libcap-2.76/pam_cap/pam_cap.c:321:19: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_caps’ /usr/include/security/pam_modules.h:36:5: enter_function: entry to ‘pam_sm_setcred’ libcap-2.76/pam_cap/pam_cap.c:469:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:474:5: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:477:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:483:14: call_function: calling ‘set_capabilities’ from ‘pam_sm_setcred’ # 319| if (cs->defer) { # 320| D(("configured to delay applying IAB")); # 321|-> int ret = pam_set_data(cs->pamh, "pam_cap_iab", iab, iab_apply); # 322| if (ret != PAM_SUCCESS) { # 323| D(("unable to cache capabilities for delayed setting: %d", ret)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def41] libcap-2.76/pam_cap/pam_cap.c:325:13: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_caps’ /usr/include/security/pam_modules.h:36:5: enter_function: entry to ‘pam_sm_setcred’ libcap-2.76/pam_cap/pam_cap.c:469:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:474:5: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:477:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:483:14: call_function: calling ‘set_capabilities’ from ‘pam_sm_setcred’ # 323| D(("unable to cache capabilities for delayed setting: %d", ret)); # 324| /* since ok=0, the module will return PAM_IGNORE */ # 325|-> cap_free(iab); # 326| } # 327| iab = NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] libcap-2.76/pam_cap/pam_cap.c:328:17: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_caps’ /usr/include/security/pam_modules.h:36:5: enter_function: entry to ‘pam_sm_setcred’ libcap-2.76/pam_cap/pam_cap.c:469:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:474:5: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:477:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:483:14: call_function: calling ‘set_capabilities’ from ‘pam_sm_setcred’ # 326| } # 327| iab = NULL; # 328|-> } else if (!cap_iab_set_proc(iab)) { # 329| D(("able to set the IAB [%s] value", conf_caps)); # 330| ok = 1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def43] libcap-2.76/pam_cap/pam_cap.c:332:5: warning[-Wanalyzer-malloc-leak]: leak of ‘conf_caps’ /usr/include/security/pam_modules.h:36:5: enter_function: entry to ‘pam_sm_setcred’ libcap-2.76/pam_cap/pam_cap.c:469:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:474:5: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:477:8: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:483:14: call_function: calling ‘set_capabilities’ from ‘pam_sm_setcred’ # 330| ok = 1; # 331| } # 332|-> cap_free(iab); # 333| # 334| if (cs->keepcaps) { Error: GCC_ANALYZER_WARNING (CWE-404): [#def44] libcap-2.76/pam_cap/pam_cap.c:366:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’ libcap-2.76/pam_cap/pam_cap.c:372:13: enter_function: entry to ‘parse_args’ libcap-2.76/pam_cap/pam_cap.c:379:12: branch_true: following ‘true’ branch (when ‘argc > 0’)... libcap-2.76/pam_cap/pam_cap.c:380:14: branch_true: ...to here libcap-2.76/pam_cap/pam_cap.c:380:12: branch_false: following ‘false’ branch (when the strings are non-equal)... libcap-2.76/pam_cap/pam_cap.c:382:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:382:19: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:384:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:384:19: branch_false: following ‘false’ branch (when the strings are non-equal)... libcap-2.76/pam_cap/pam_cap.c:386:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:386:19: branch_false: following ‘false’ branch (when the strings are non-equal)... libcap-2.76/pam_cap/pam_cap.c:388:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:388:19: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:390:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:390:19: branch_false: following ‘false’ branch (when the strings are non-equal)... libcap-2.76/pam_cap/pam_cap.c:393:13: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:393:13: call_function: calling ‘_pam_log’ from ‘parse_args’ # 364| # 365| va_start(args, format); # 366|-> openlog("pam_cap", LOG_CONS|LOG_PID, LOG_AUTH); # 367| vsyslog(err, format, args); # 368| va_end(args); Error: GCC_ANALYZER_WARNING (CWE-404): [#def45] libcap-2.76/pam_cap/pam_cap.c:367:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’ libcap-2.76/pam_cap/pam_cap.c:372:13: enter_function: entry to ‘parse_args’ libcap-2.76/pam_cap/pam_cap.c:379:12: branch_true: following ‘true’ branch (when ‘argc > 0’)... libcap-2.76/pam_cap/pam_cap.c:380:14: branch_true: ...to here libcap-2.76/pam_cap/pam_cap.c:380:12: branch_false: following ‘false’ branch (when the strings are non-equal)... libcap-2.76/pam_cap/pam_cap.c:382:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:382:19: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:384:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:384:19: branch_false: following ‘false’ branch (when the strings are non-equal)... libcap-2.76/pam_cap/pam_cap.c:386:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:386:19: branch_false: following ‘false’ branch (when the strings are non-equal)... libcap-2.76/pam_cap/pam_cap.c:388:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:388:19: branch_false: following ‘false’ branch... libcap-2.76/pam_cap/pam_cap.c:390:21: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:390:19: branch_false: following ‘false’ branch (when the strings are non-equal)... libcap-2.76/pam_cap/pam_cap.c:393:13: branch_false: ...to here libcap-2.76/pam_cap/pam_cap.c:393:13: call_function: calling ‘_pam_log’ from ‘parse_args’ # 365| va_start(args, format); # 366| openlog("pam_cap", LOG_CONS|LOG_PID, LOG_AUTH); # 367|-> vsyslog(err, format, args); # 368| va_end(args); # 369| closelog(); Error: GCC_ANALYZER_WARNING (CWE-688): [#def46] libcap-2.76/psx/psx.c:108:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘psx_tracker.pid_path’ where non-null expected libcap-2.76/psx/psx.c:159:45: enter_function: entry to ‘psx_lock’ libcap-2.76/psx/psx.c:163:9: call_function: calling ‘_psx_proc_start’ from ‘psx_lock’ #argument 1 of ‘__builtin_sprintf’ must be non-null # 106| psx_tracker.pid_path = calloc(1, 3*sizeof(pid) + sizeof(taskdir_fmt)); # 107| } # 108|-> sprintf(psx_tracker.pid_path, taskdir_fmt, pid); # 109| psx_tracker.state = _PSX_IDLE; # 110| psx_tracker.cmd.active = 0;
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-242.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-gcc-latest-x86_64 |
| project-name | libcap-2.76-4.fc44 |
| store-results-to | /tmp/tmp25iyo3o3/libcap-2.76-4.fc44.tar.xz |
| time-created | 2025-10-28 18:57:38 |
| time-finished | 2025-10-28 19:00:32 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmp25iyo3o3/libcap-2.76-4.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp25iyo3o3/libcap-2.76-4.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |