libcap-ng-0.8.5-8.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
libcap-ng-0.8.5/bindings/python3/capng_wrap.c:724:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'iter'
libcap-ng-0.8.5/bindings/python3/capng_wrap.c:4464:22: enter_function: entry to '_wrap_capng_name_to_capability'
libcap-ng-0.8.5/bindings/python3/capng_wrap.c:4474:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
libcap-ng-0.8.5/bindings/python3/capng_wrap.c:4476:10: branch_false: ...to here
libcap-ng-0.8.5/bindings/python3/capng_wrap.c:4476:10: call_function: calling 'SWIG_AsCharPtrAndSize' from '_wrap_capng_name_to_capability'
#  722|     swig_module_info *iter = start;
#  723|     do {
#  724|->     if (iter->size) {
#  725|         size_t l = 0;
#  726|         size_t r = iter->size - 1;

Error: CPPCHECK_WARNING (CWE-457): [#def2]
libcap-ng-0.8.5/bindings/python3/capng_wrap.c:872: warning[uninitvar]: Uninitialized variable: buff
#  870|       *r = 0;
#  871|     }
#  872|->   return buff;
#  873|   }
#  874|   

Error: CPPCHECK_WARNING (CWE-476): [#def3]
libcap-ng-0.8.5/bindings/python3/capng_wrap.c:1901: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1899|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1900|       /* the klass element */
# 1901|->     data->klass = obj;
# 1902|       SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: CPPCHECK_WARNING (CWE-476): [#def4]
libcap-ng-0.8.5/bindings/python3/capng_wrap.c:1902: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1900|       /* the klass element */
# 1901|       data->klass = obj;
# 1902|->     SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1904|       if (PyClass_Check(obj)) {

Error: COMPILER_WARNING (CWE-252): [#def5]
libcap-ng-0.8.5/utils/captest.c: scope_hint: In function ‘report’
libcap-ng-0.8.5/utils/captest.c:75:25: warning[-Wunused-result]: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’
#   75 |                         setuid(0);
#      |                         ^~~~~~~~~
#   73|   						 CAP_SETUID)) {
#   74|   			printf("Attempting to regain root...");
#   75|-> 			setuid(0);
#   76|   			getresuid(&uid, &euid, &suid);
#   77|   			if (uid == 0) {

Error: COMPILER_WARNING (CWE-252): [#def6]
libcap-ng-0.8.5/utils/captest.c:79:33: warning[-Wunused-result]: ignoring return value of ‘setgid’ declared with attribute ‘warn_unused_result’
#   79 |                                 setgid(0);
#      |                                 ^~~~~~~~~
#   77|   			if (uid == 0) {
#   78|   				printf("SUCCESS - PRIVILEGE ESCALATION POSSIBLE\n");
#   79|-> 				setgid(0);
#   80|   				getresgid(&gid, &egid, &sgid);
#   81|   				escalated = 1;

Error: COMPILER_WARNING (CWE-252): [#def7]
libcap-ng-0.8.5/utils/captest.c:198:25: warning[-Wunused-result]: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’
#  198 |                         system("/usr/bin/captest --no-child --text");
#      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  196|   			printf("FAILED\n");
#  197|   		if (text)
#  198|-> 			system("/usr/bin/captest --no-child --text");
#  199|   		else
#  200|   			system("/usr/bin/captest --no-child");

Error: COMPILER_WARNING (CWE-252): [#def8]
libcap-ng-0.8.5/utils/captest.c:200:25: warning[-Wunused-result]: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’
#  200 |                         system("/usr/bin/captest --no-child");
#      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  198|   			system("/usr/bin/captest --no-child --text");
#  199|   		else
#  200|-> 			system("/usr/bin/captest --no-child");
#  201|   	}
#  202|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
libcap-ng-0.8.5/utils/filecap.c:65:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fpath, 524288)’
libcap-ng-0.8.5/utils/filecap.c:57:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/filecap.c:60:18: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:60:18: acquire_resource: opened here
libcap-ng-0.8.5/utils/filecap.c:61:12: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/filecap.c:65:17: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:65:17: danger: ‘open(fpath, 524288)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   63|   		int permitted = 0;
#   64|   
#   65|-> 		capng_clear(CAPNG_SELECT_BOTH);
#   66|   		if (capng_get_caps_fd(fd) < 0 && errno != ENODATA) {
#   67|   			fprintf(stderr,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
libcap-ng-0.8.5/utils/filecap.c:66:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fpath, 524288)’
libcap-ng-0.8.5/utils/filecap.c:57:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/filecap.c:60:18: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:60:18: acquire_resource: opened here
libcap-ng-0.8.5/utils/filecap.c:61:12: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/filecap.c:65:17: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:66:21: danger: ‘open(fpath, 524288)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   64|   
#   65|   		capng_clear(CAPNG_SELECT_BOTH);
#   66|-> 		if (capng_get_caps_fd(fd) < 0 && errno != ENODATA) {
#   67|   			fprintf(stderr,
#   68|   				"Unable to get capabilities of %s: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
libcap-ng-0.8.5/utils/filecap.c:191:33: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
libcap-ng-0.8.5/utils/filecap.c:183:12: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/filecap.c:185:20: branch_true: following ‘true’ branch (when ‘path_env’ is non-NULL)...
libcap-ng-0.8.5/utils/filecap.c:186:32: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:186:32: acquire_memory: allocated here
libcap-ng-0.8.5/utils/filecap.c:187:28: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
libcap-ng-0.8.5/utils/filecap.c:189:34: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:189:52: branch_true: following ‘true’ branch (when ‘dir’ is non-NULL)...
libcap-ng-0.8.5/utils/filecap.c:191:33: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:191:33: danger: ‘path’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  189|   			for (dir=strtok(path,":"); dir!=NULL;
#  190|   						dir=strtok(NULL,":")) {
#  191|-> 				nftw(dir, check_file, 1024, nftw_flags);
#  192|   			}
#  193|   			free(path);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
libcap-ng-0.8.5/utils/filecap.c:214:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 655361)’
libcap-ng-0.8.5/utils/filecap.c:123:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
 branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:124:27: branch_true: following ‘true’ branch (when ‘i < argc’)...
libcap-ng-0.8.5/utils/filecap.c:125:40: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:129:35: branch_false: following ‘false’ branch (when the strings are non-equal)...
libcap-ng-0.8.5/utils/filecap.c:139:36: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:164:36: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/filecap.c:171:44: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:171:43: branch_true: following ‘true’ branch (when the strings are equal)...
libcap-ng-0.8.5/utils/filecap.c:172:41: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:124:27: branch_true: following ‘true’ branch (when ‘i < argc’)...
libcap-ng-0.8.5/utils/filecap.c:125:40: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:125:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
libcap-ng-0.8.5/utils/filecap.c:129:36: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:129:35: branch_false: following ‘false’ branch (when the strings are non-equal)...
libcap-ng-0.8.5/utils/filecap.c:139:36: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:139:35: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/filecap.c:140:37: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:140:36: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/filecap.c:149:37: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:149:37: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/filecap.c:151:41: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:198:19: branch_false: following ‘false’ branch (when ‘dir’ is NULL)...
libcap-ng-0.8.5/utils/filecap.c:201:18: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:201:18: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
libcap-ng-0.8.5/utils/filecap.c:201:27: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:201:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/filecap.c:205:20: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:205:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/filecap.c:207:26: branch_true: ...to here
libcap-ng-0.8.5/utils/filecap.c:207:26: acquire_resource: opened here
libcap-ng-0.8.5/utils/filecap.c:208:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/filecap.c:214:21: branch_false: ...to here
libcap-ng-0.8.5/utils/filecap.c:214:21: danger: ‘open(path, 655361)’ leaks here; was opened at [(31)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/30)
#  212|   			return 1;
#  213|   		}
#  214|-> 		if (capng_apply_caps_fd(fd) < 0) {
#  215|   			fprintf(stderr,
#  216|   				"Could not set capabilities on %s: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
libcap-ng-0.8.5/utils/netcap.c:58:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’
libcap-ng-0.8.5/utils/netcap.c:53:13: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:24: danger: ‘opendir("/proc")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   56|   		return 1;
#   57|   	}
#   58|-> 	while (( ent = readdir(d) )) {
#   59|   		FILE *sf;
#   60|   		int pid, ppid;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
libcap-ng-0.8.5/utils/netcap.c:145:24: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:113:32: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:113:32: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:115:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:145:24: danger: ‘text’ leaks here; was allocated at [(23)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/22)
#  143|   		}
#  144|   
#  145|-> 		caps = capng_have_capabilities(CAPNG_SELECT_AMBIENT);
#  146|   		if (caps > CAPNG_NONE)
#  147|   			ambient = strdup("@");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libcap-ng-0.8.5/utils/netcap.c:157:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ambient’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:147:35: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:157:24: danger: ‘ambient’ leaks here; was allocated at [(27)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/26)
#  155|   
#  156|   		// Now record the bounding set information
#  157|-> 		caps = capng_have_capabilities(CAPNG_SELECT_BOUNDS);
#  158|   		if (caps > CAPNG_NONE)
#  159|   			bounds = strdup("+");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libcap-ng-0.8.5/utils/netcap.c:157:24: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:113:32: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:113:32: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:115:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:157:24: danger: ‘text’ leaks here; was allocated at [(23)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/22)
#  155|   
#  156|   		// Now record the bounding set information
#  157|-> 		caps = capng_have_capabilities(CAPNG_SELECT_BOUNDS);
#  158|   		if (caps > CAPNG_NONE)
#  159|   			bounds = strdup("+");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libcap-ng-0.8.5/utils/netcap.c:171:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ambient’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:147:35: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:171:21: danger: ‘ambient’ leaks here; was allocated at [(27)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/26)
#  169|   		// Now lets get the inodes each process has open
#  170|   		snprintf(buf, 32, "/proc/%d/fd", pid);
#  171|-> 		f = opendir(buf);
#  172|   		if (f == NULL) {
#  173|   			if (errno == EACCES) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libcap-ng-0.8.5/utils/netcap.c:171:21: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:159:34: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:171:21: danger: ‘bounds’ leaks here; was allocated at [(31)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/30)
#  169|   		// Now lets get the inodes each process has open
#  170|   		snprintf(buf, 32, "/proc/%d/fd", pid);
#  171|-> 		f = opendir(buf);
#  172|   		if (f == NULL) {
#  173|   			if (errno == EACCES) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libcap-ng-0.8.5/utils/netcap.c:171:21: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:107:32: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:171:21: danger: ‘text’ leaks here; was allocated at [(23)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/22)
#  169|   		// Now lets get the inodes each process has open
#  170|   		snprintf(buf, 32, "/proc/%d/fd", pid);
#  171|-> 		f = opendir(buf);
#  172|   		if (f == NULL) {
#  173|   			if (errno == EACCES) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
libcap-ng-0.8.5/utils/netcap.c:189:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ambient’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:147:35: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:32: danger: ‘ambient’ leaks here; was allocated at [(27)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/26)
#  187|   		}
#  188|   		// For each file in the fd dir...
#  189|-> 		while (( ent = readdir(f) )) {
#  190|   			char line[256], ln[256], *s, *e;
#  191|   			unsigned long inode;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libcap-ng-0.8.5/utils/netcap.c:189:32: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:159:34: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:32: danger: ‘bounds’ leaks here; was allocated at [(31)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/30)
#  187|   		}
#  188|   		// For each file in the fd dir...
#  189|-> 		while (( ent = readdir(f) )) {
#  190|   			char line[256], ln[256], *s, *e;
#  191|   			unsigned long inode;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libcap-ng-0.8.5/utils/netcap.c:189:32: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&buf)’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:171:21: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:32: danger: ‘opendir(&buf)’ leaks here; was allocated at [(33)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/32)
#  187|   		}
#  188|   		// For each file in the fd dir...
#  189|-> 		while (( ent = readdir(f) )) {
#  190|   			char line[256], ln[256], *s, *e;
#  191|   			unsigned long inode;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libcap-ng-0.8.5/utils/netcap.c:189:32: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:107:32: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:32: danger: ‘text’ leaks here; was allocated at [(23)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/22)
#  187|   		}
#  188|   		// For each file in the fd dir...
#  189|-> 		while (( ent = readdir(f) )) {
#  190|   			char line[256], ln[256], *s, *e;
#  191|   			unsigned long inode;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libcap-ng-0.8.5/utils/netcap.c:233:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ambient’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:147:35: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:195:29: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:195:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:197:57: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:198:28: branch_false: following ‘false’ branch (when ‘llen >= 0’)...
libcap-ng-0.8.5/utils/netcap.c:200:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:213:35: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:218:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:220:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:222:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:230:28: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:233:33: danger: ‘ambient’ leaks here; was allocated at [(27)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/26)
#  231|   			    node.ambient)
#  232|   				// We make one entry for each socket inode
#  233|-> 				list_append(&l, &node);
#  234|   			else {
#  235|   				free(node.cmd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libcap-ng-0.8.5/utils/netcap.c:233:33: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:159:34: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:195:29: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:195:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:197:57: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:198:28: branch_false: following ‘false’ branch (when ‘llen >= 0’)...
libcap-ng-0.8.5/utils/netcap.c:200:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:213:35: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:218:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:220:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:222:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:230:28: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:233:33: danger: ‘bounds’ leaks here; was allocated at [(31)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/30)
#  231|   			    node.ambient)
#  232|   				// We make one entry for each socket inode
#  233|-> 				list_append(&l, &node);
#  234|   			else {
#  235|   				free(node.cmd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libcap-ng-0.8.5/utils/netcap.c:233:33: warning[-Wanalyzer-malloc-leak]: leak of ‘node.ambient’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:195:29: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:195:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:197:57: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:198:28: branch_false: following ‘false’ branch (when ‘llen >= 0’)...
libcap-ng-0.8.5/utils/netcap.c:200:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:213:35: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:218:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:220:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:222:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:229:40: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:230:28: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:230:29: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:233:33: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:233:33: danger: ‘node.ambient’ leaks here; was allocated at [(45)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/44)
#  231|   			    node.ambient)
#  232|   				// We make one entry for each socket inode
#  233|-> 				list_append(&l, &node);
#  234|   			else {
#  235|   				free(node.cmd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libcap-ng-0.8.5/utils/netcap.c:233:33: warning[-Wanalyzer-malloc-leak]: leak of ‘node.bounds’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:195:29: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:195:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:197:57: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:198:28: branch_false: following ‘false’ branch (when ‘llen >= 0’)...
libcap-ng-0.8.5/utils/netcap.c:200:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:213:35: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:218:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:220:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:222:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:228:39: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:230:28: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:230:29: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:233:33: danger: ‘node.bounds’ leaks here; was allocated at [(45)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/44)
#  231|   			    node.ambient)
#  232|   				// We make one entry for each socket inode
#  233|-> 				list_append(&l, &node);
#  234|   			else {
#  235|   				free(node.cmd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libcap-ng-0.8.5/utils/netcap.c:233:33: warning[-Wanalyzer-malloc-leak]: leak of ‘node.capabilities’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:195:29: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:195:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:197:57: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:198:28: branch_false: following ‘false’ branch (when ‘llen >= 0’)...
libcap-ng-0.8.5/utils/netcap.c:200:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:213:35: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:218:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:220:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:222:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:227:45: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:230:28: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:230:29: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:230:29: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:233:33: danger: ‘node.capabilities’ leaks here; was allocated at [(45)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/44)
#  231|   			    node.ambient)
#  232|   				// We make one entry for each socket inode
#  233|-> 				list_append(&l, &node);
#  234|   			else {
#  235|   				free(node.cmd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libcap-ng-0.8.5/utils/netcap.c:233:33: warning[-Wanalyzer-malloc-leak]: leak of ‘node.cmd’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:195:29: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:195:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:197:57: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:198:28: branch_false: following ‘false’ branch (when ‘llen >= 0’)...
libcap-ng-0.8.5/utils/netcap.c:200:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:213:35: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:218:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:220:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:222:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:225:36: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:230:28: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:233:33: danger: ‘node.cmd’ leaks here; was allocated at [(45)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/44)
#  231|   			    node.ambient)
#  232|   				// We make one entry for each socket inode
#  233|-> 				list_append(&l, &node);
#  234|   			else {
#  235|   				free(node.cmd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libcap-ng-0.8.5/utils/netcap.c:233:33: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:107:32: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:195:29: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:195:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:197:57: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:198:28: branch_false: following ‘false’ branch (when ‘llen >= 0’)...
libcap-ng-0.8.5/utils/netcap.c:200:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:213:35: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:218:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:220:28: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:222:25: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:230:28: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:233:33: danger: ‘text’ leaks here; was allocated at [(23)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/22)
#  231|   			    node.ambient)
#  232|   				// We make one entry for each socket inode
#  233|-> 				list_append(&l, &node);
#  234|   			else {
#  235|   				free(node.cmd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libcap-ng-0.8.5/utils/netcap.c:241:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ambient’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:147:35: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:241:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:241:17: danger: ‘ambient’ leaks here; was allocated at [(27)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/26)
#  239|   			}
#  240|   		}
#  241|-> 		closedir(f);
#  242|   		free(text);
#  243|   		free(bounds);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libcap-ng-0.8.5/utils/netcap.c:241:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:159:34: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:241:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:241:17: danger: ‘bounds’ leaks here; was allocated at [(31)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/30)
#  239|   			}
#  240|   		}
#  241|-> 		closedir(f);
#  242|   		free(text);
#  243|   		free(bounds);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
libcap-ng-0.8.5/utils/netcap.c:241:17: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
libcap-ng-0.8.5/utils/netcap.c:54:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:58:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:65:30: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:68:19: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:70:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:72:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:76:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:78:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:80:23: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:82:20: branch_false: following ‘false’ branch (when ‘len > 39’)...
libcap-ng-0.8.5/utils/netcap.c:84:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:86:20: branch_true: following ‘true’ branch (when ‘tmp’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:87:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:95:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:101:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:103:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:104:20: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:106:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:107:32: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:107:32: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:108:28: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:123:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:146:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:147:35: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:150:20: branch_false: following ‘false’ branch (when ‘ambient’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:157:24: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:158:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:159:34: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:162:20: branch_false: following ‘false’ branch (when ‘bounds’ is non-NULL)...
libcap-ng-0.8.5/utils/netcap.c:170:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:172:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:189:24: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:241:17: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:241:17: danger: ‘text’ leaks here; was allocated at [(23)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/22)
#  239|   			}
#  240|   		}
#  241|-> 		closedir(f);
#  242|   		free(text);
#  243|   		free(bounds);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
libcap-ng-0.8.5/utils/netcap.c:268:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/net/packet", "rte")’
libcap-ng-0.8.5/utils/netcap.c:427:13: enter_function: entry to ‘read_packet’
libcap-ng-0.8.5/utils/netcap.c:436:13: acquire_resource: opened here
libcap-ng-0.8.5/utils/netcap.c:437:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:443:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:444:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:444:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:454:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:455:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:455:25: call_function: calling ‘report_finding’ from ‘read_packet’
#  266|   	} else if (last_uid != (int)n->uid) {
#  267|   		// Only look up if name changed
#  268|-> 		p = getpwuid(n->uid);
#  269|   		last_uid = n->uid;
#  270|   		if (p)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def35]
libcap-ng-0.8.5/utils/netcap.c:268:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(proc, "rte")’
libcap-ng-0.8.5/utils/netcap.c:286:13: enter_function: entry to ‘read_tcp’
libcap-ng-0.8.5/utils/netcap.c:296:13: acquire_resource: opened here
libcap-ng-0.8.5/utils/netcap.c:297:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:303:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:304:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:304:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:315:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:316:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:316:25: call_function: calling ‘report_finding’ from ‘read_tcp’
#  266|   	} else if (last_uid != (int)n->uid) {
#  267|   		// Only look up if name changed
#  268|-> 		p = getpwuid(n->uid);
#  269|   		last_uid = n->uid;
#  270|   		if (p)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
libcap-ng-0.8.5/utils/netcap.c:268:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/net/packet", "rte")’
libcap-ng-0.8.5/utils/netcap.c:427:13: enter_function: entry to ‘read_packet’
libcap-ng-0.8.5/utils/netcap.c:436:13: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:437:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:443:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:444:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:444:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:454:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:455:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:455:25: call_function: calling ‘report_finding’ from ‘read_packet’
#  266|   	} else if (last_uid != (int)n->uid) {
#  267|   		// Only look up if name changed
#  268|-> 		p = getpwuid(n->uid);
#  269|   		last_uid = n->uid;
#  270|   		if (p)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
libcap-ng-0.8.5/utils/netcap.c:268:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(proc, "rte")’
libcap-ng-0.8.5/utils/netcap.c:356:13: enter_function: entry to ‘read_raw’
libcap-ng-0.8.5/utils/netcap.c:366:13: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:367:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:373:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:374:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:374:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:385:20: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:386:25: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:386:25: call_function: calling ‘report_finding’ from ‘read_raw’
#  266|   	} else if (last_uid != (int)n->uid) {
#  267|   		// Only look up if name changed
#  268|-> 		p = getpwuid(n->uid);
#  269|   		last_uid = n->uid;
#  270|   		if (p)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
libcap-ng-0.8.5/utils/netcap.c:315:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(proc, "rte")’
libcap-ng-0.8.5/utils/netcap.c:296:13: acquire_resource: opened here
libcap-ng-0.8.5/utils/netcap.c:297:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:303:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:304:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:304:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:315:21: danger: ‘fopen(proc, "rte")’ leaks here; was opened at [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0)
#  313|   			&state, &txq, &rxq, &timer_run, &time_len, &retr,
#  314|   			&uid, &timeout, &inode, more);
#  315|-> 		if (list_find_inode(&l, inode))
#  316|   			report_finding(local_port, type, NULL);
#  317|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
libcap-ng-0.8.5/utils/netcap.c:315:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(proc, "rte")’
libcap-ng-0.8.5/utils/netcap.c:296:13: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:297:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:303:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:304:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:304:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:305:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:315:21: danger: ‘fopen(proc, "rte")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
#  313|   			&state, &txq, &rxq, &timer_run, &time_len, &retr,
#  314|   			&uid, &timeout, &inode, more);
#  315|-> 		if (list_find_inode(&l, inode))
#  316|   			report_finding(local_port, type, NULL);
#  317|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
libcap-ng-0.8.5/utils/netcap.c:350:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(proc, "rte")’
libcap-ng-0.8.5/utils/netcap.c:331:13: acquire_resource: opened here
libcap-ng-0.8.5/utils/netcap.c:332:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:338:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:339:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:340:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:340:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:340:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:339:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:340:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:350:21: danger: ‘fopen(proc, "rte")’ leaks here; was opened at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
#  348|   			&state, &txq, &rxq, &timer_run, &time_len, &retr,
#  349|   			&uid, &timeout, &inode, more);
#  350|-> 		if (list_find_inode(&l, inode))
#  351|   			report_finding(local_port, type, NULL);
#  352|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
libcap-ng-0.8.5/utils/netcap.c:350:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(proc, "rte")’
libcap-ng-0.8.5/utils/netcap.c:331:13: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:332:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:338:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:339:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:340:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:340:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:340:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:339:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:340:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:350:21: danger: ‘fopen(proc, "rte")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
#  348|   			&state, &txq, &rxq, &timer_run, &time_len, &retr,
#  349|   			&uid, &timeout, &inode, more);
#  350|-> 		if (list_find_inode(&l, inode))
#  351|   			report_finding(local_port, type, NULL);
#  352|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
libcap-ng-0.8.5/utils/netcap.c:385:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(proc, "rte")’
libcap-ng-0.8.5/utils/netcap.c:366:13: acquire_resource: opened here
libcap-ng-0.8.5/utils/netcap.c:367:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:373:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:374:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:374:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:385:21: danger: ‘fopen(proc, "rte")’ leaks here; was opened at [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
#  383|   			&state, &txq, &rxq, &timer_run, &time_len, &retr,
#  384|   			&uid, &timeout, &inode, more);
#  385|-> 		if (list_find_inode(&l, inode))
#  386|   			report_finding(0, type, NULL);
#  387|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
libcap-ng-0.8.5/utils/netcap.c:385:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(proc, "rte")’
libcap-ng-0.8.5/utils/netcap.c:366:13: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:367:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:373:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:374:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:374:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:375:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:385:21: danger: ‘fopen(proc, "rte")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
#  383|   			&state, &txq, &rxq, &timer_run, &time_len, &retr,
#  384|   			&uid, &timeout, &inode, more);
#  385|-> 		if (list_find_inode(&l, inode))
#  386|   			report_finding(0, type, NULL);
#  387|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
libcap-ng-0.8.5/utils/netcap.c:454:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/net/packet", "rte")’
libcap-ng-0.8.5/utils/netcap.c:436:13: acquire_resource: opened here
libcap-ng-0.8.5/utils/netcap.c:437:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:443:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:444:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:444:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:454:21: danger: ‘fopen("/proc/net/packet", "rte")’ leaks here; was opened at [(1)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/0)
#  452|   			&r, &rmem, &uid, &inode, more);
#  453|   		get_interface(iface, ifc);
#  454|-> 		if (list_find_inode(&l, inode))
#  455|   			report_finding(0, "pkt", ifc);
#  456|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
libcap-ng-0.8.5/utils/netcap.c:454:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/net/packet", "rte")’
libcap-ng-0.8.5/utils/netcap.c:436:13: acquire_memory: allocated here
libcap-ng-0.8.5/utils/netcap.c:437:12: branch_false: following ‘false’ branch...
libcap-ng-0.8.5/utils/netcap.c:443:9: branch_false: ...to here
libcap-ng-0.8.5/utils/netcap.c:444:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: following ‘true’ branch (when ‘line == 0’)...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:444:16: branch_true: following ‘true’ branch...
libcap-ng-0.8.5/utils/netcap.c:445:20: branch_true: ...to here
libcap-ng-0.8.5/utils/netcap.c:454:21: danger: ‘fopen("/proc/net/packet", "rte")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
#  452|   			&r, &rmem, &uid, &inode, more);
#  453|   		get_interface(iface, ifc);
#  454|-> 		if (list_find_inode(&l, inode))
#  455|   			report_finding(0, "pkt", ifc);
#  456|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
libcap-ng-0.8.5/utils/pscap.c:118:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’
libcap-ng-0.8.5/utils/pscap.c:85:12: branch_false: following ‘false’ branch (when ‘argc <= 3’)...
libcap-ng-0.8.5/utils/pscap.c:89:12: branch_false: ...to here
libcap-ng-0.8.5/utils/pscap.c:113:13: acquire_memory: allocated here
libcap-ng-0.8.5/utils/pscap.c:114:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libcap-ng-0.8.5/utils/pscap.c:118:24: danger: ‘opendir("/proc")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  116|   		return 1;
#  117|   	}
#  118|-> 	while (( ent = readdir(d) )) {
#  119|   		int pid, ppid, uid = -1, euid = -1;
#  120|   		char buf[100];

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-178.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibcap-ng-0.8.5-8.fc44
store-results-to/tmp/tmpyl0c2791/libcap-ng-0.8.5-8.fc44.tar.xz
time-created2025-10-28 18:53:36
time-finished2025-10-28 18:55:07
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpyl0c2791/libcap-ng-0.8.5-8.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpyl0c2791/libcap-ng-0.8.5-8.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9