nfs-utils-2.8.2-1.rc8.fc43

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-127): [#def1]
nfs-utils-2.8.2/support/export/auth.c:317:31: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
nfs-utils-2.8.2/support/export/auth.c:232:1: enter_function: entry to ‘auth_authenticate’
nfs-utils-2.8.2/support/export/auth.c:242:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/support/export/auth.c:248:9: branch_false: ...to here
nfs-utils-2.8.2/support/export/auth.c:250:9: call_function: calling ‘auth_fixpath’ from ‘auth_authenticate’
#  315|   			*cp++ = *sp;
#  316|   	}
#  317|-> 	while (cp > path+1 && cp[-1] == '/')
#  318|   		cp--;
#  319|   	*cp = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
nfs-utils-2.8.2/support/export/v4clients.c:109:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
nfs-utils-2.8.2/support/export/v4clients.c:204:5: enter_function: entry to ‘v4clients_process’
nfs-utils-2.8.2/support/export/v4clients.c:211:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:212:14: branch_false: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:211:13: branch_false: following ‘false’ branch...
 branch_false: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:215:16: branch_true: following ‘true’ branch...
 branch_true: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:216:33: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:221:35: branch_true: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:222:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:224:29: branch_false: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:224:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:225:33: branch_true: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:225:33: call_function: calling ‘add_id’ from ‘v4clients_process’
#  107|   
#  108|   	if (asprintf(&path, "/proc/fs/nfsd/clients/%lu/info", key->num) < 0)
#  109|-> 		return;
#  110|   
#  111|   	f = fopen(path, "r");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
nfs-utils-2.8.2/support/export/v4clients.c:146:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
nfs-utils-2.8.2/support/export/v4clients.c:204:5: enter_function: entry to ‘v4clients_process’
nfs-utils-2.8.2/support/export/v4clients.c:211:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:212:14: branch_false: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:211:13: branch_false: following ‘false’ branch...
 branch_false: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:215:16: branch_true: following ‘true’ branch...
 branch_true: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:216:33: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:221:35: branch_true: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:222:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:224:29: branch_false: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:224:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:225:33: branch_true: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:225:33: call_function: calling ‘add_id’ from ‘v4clients_process’
#  144|   		     key->vers, key->clientid ?: "-none-",
#  145|   		     key->addr ?: "-none-");
#  146|-> 	if (!key->unconfirmed && key->wid >= 0) {
#  147|   		inotify_rm_watch(clients_fd, key->wid);
#  148|   		key->wid = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
nfs-utils-2.8.2/support/export/v4clients.c:146:13: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
nfs-utils-2.8.2/support/export/v4clients.c:204:5: enter_function: entry to ‘v4clients_process’
nfs-utils-2.8.2/support/export/v4clients.c:211:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:212:14: branch_false: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:211:13: branch_false: following ‘false’ branch...
 branch_false: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:215:16: branch_true: following ‘true’ branch...
 branch_true: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:216:33: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:221:35: branch_true: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:222:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:224:29: branch_false: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:224:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/support/export/v4clients.c:225:33: branch_true: ...to here
nfs-utils-2.8.2/support/export/v4clients.c:225:33: call_function: calling ‘add_id’ from ‘v4clients_process’
#  144|   		     key->vers, key->clientid ?: "-none-",
#  145|   		     key->addr ?: "-none-");
#  146|-> 	if (!key->unconfirmed && key->wid >= 0) {
#  147|   		inotify_rm_watch(clients_fd, key->wid);
#  148|   		key->wid = -1;

Error: CPPCHECK_WARNING (CWE-562): [#def5]
nfs-utils-2.8.2/support/export/v4root.c:115: error[invalidLifetime]: Using object that points to local variable 'uuid_s' that is out of scope.
#  113|   		eep.e_uuid = uuid_s;
#  114|   	}
#  115|-> 	set_pseudofs_security(&eep);
#  116|   	exp = export_create(&eep, 0);
#  117|   	if (exp == NULL)

Error: CPPCHECK_WARNING (CWE-476): [#def6]
nfs-utils-2.8.2/support/nfs/conffile.c:1750: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
# 1748|   	if (*name == '"') {
# 1749|   		char * new = strdup(name+1);
# 1750|-> 		end = strchr(new, '"');
# 1751|   		if (end != NULL) {
# 1752|   			*end = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def7]
nfs-utils-2.8.2/support/nfs/conffile.c:1750:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'new' where non-null expected
nfs-utils-2.8.2/support/nfs/conffile.c:1712:12: branch_false: following 'false' branch (when 'end' is non-NULL)...
 branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1720:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
nfs-utils-2.8.2/support/nfs/conffile.c:1726:15: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1727:12: branch_false: following 'false' branch (when 'end' is NULL)...
nfs-utils-2.8.2/support/nfs/conffile.c:1729:15: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1730:12: branch_false: following 'false' branch (when 'end' is NULL)...
nfs-utils-2.8.2/support/nfs/conffile.c:1734:15: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1737:12: branch_false: following 'false' branch (when 'end' is non-NULL)...
 branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1748:12: branch_true: following 'true' branch...
nfs-utils-2.8.2/support/nfs/conffile.c:1749:37: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1749:30: acquire_memory: this call could return NULL
nfs-utils-2.8.2/support/nfs/conffile.c:1750:23: danger: argument 1 ('new') from [(17)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/16) could be NULL where non-null expected
#argument 1 of '__builtin_strchr' must be non-null
# 1748|   	if (*name == '"') {
# 1749|   		char * new = strdup(name+1);
# 1750|-> 		end = strchr(new, '"');
# 1751|   		if (end != NULL) {
# 1752|   			*end = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
nfs-utils-2.8.2/support/nfs/conffile.c:1842:37: warning[-Wanalyzer-null-dereference]: dereference of NULL 'end'
nfs-utils-2.8.2/support/nfs/conffile.c:1813:12: branch_false: following 'false' branch (when 'line' is non-NULL)...
 branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1819:12: branch_false: following 'false' branch...
nfs-utils-2.8.2/support/nfs/conffile.c:1822:9: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1826:12: branch_false: following 'false' branch (when 'end' is non-NULL)...
 branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1834:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
nfs-utils-2.8.2/support/nfs/conffile.c:1840:15: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1841:12: branch_false: following 'false' branch (when 'end' is NULL)...
 branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1842:16: branch_true: following 'true' branch (when 'end > name')...
nfs-utils-2.8.2/support/nfs/conffile.c:1842:37: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:1842:37: danger: dereference of NULL 'end'
# 1840|   	end = strchr(name, ':');
# 1841|   	if (end) *(end--) = 0;
# 1842|-> 	while (end && end > name && isblank(*end))
# 1843|   		*(end--)=0;
# 1844|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
nfs-utils-2.8.2/support/nfs/conffile.c:1990:25: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(buff)'
nfs-utils-2.8.2/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.2/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.2/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.2/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.2/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.2/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2109:20: branch_false: following 'false' branch...
nfs-utils-2.8.2/support/nfs/conffile.c:2112:17: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2114:20: branch_false: following 'false' branch...
nfs-utils-2.8.2/support/nfs/conffile.c:2118:17: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2122:28: branch_false: following 'false' branch...
nfs-utils-2.8.2/support/nfs/conffile.c:2128:31: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2128:31: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.2/support/nfs/conffile.c:2128:31: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.2/support/nfs/conffile.c:2129:26: branch_true: following 'true' branch...
 branch_true: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2122:28: branch_true: following 'true' branch...
nfs-utils-2.8.2/support/nfs/conffile.c:2123:29: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2123:29: call_function: calling 'is_taggedcomment' from 'conf_write'
nfs-utils-2.8.2/support/nfs/conffile.c:2123:29: return_function: returning to 'conf_write' from 'is_taggedcomment'
nfs-utils-2.8.2/support/nfs/conffile.c:2122:29: branch_false: following 'false' branch...
nfs-utils-2.8.2/support/nfs/conffile.c:2124:37: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/conffile.c:2124:37: acquire_memory: allocated here
nfs-utils-2.8.2/support/nfs/conffile.c:2124:37: call_function: calling 'append_line' from 'conf_write'
# 1988|   		}
# 1989|   
# 1990|-> 		qbuff = make_outbuffer(thisline);
# 1991|   		if (qbuff == NULL)
# 1992|   			return -1;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def10]
nfs-utils-2.8.2/support/nfs/exports.c:663:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'opt' where non-null expected
nfs-utils-2.8.2/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
 branch_false: ...to here
nfs-utils-2.8.2/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.2/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/exports.c:653:29: acquire_memory: this call could return NULL
nfs-utils-2.8.2/support/nfs/exports.c:657:20: branch_true: following 'true' branch...
nfs-utils-2.8.2/support/nfs/exports.c:658:29: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/exports.c:663:21: danger: argument 1 ('opt') from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#  661|   
#  662|   		/* process keyword */
#  663|-> 		if (strcmp(opt, "ro") == 0)
#  664|   			setflags(NFSEXP_READONLY, active, ep);
#  665|   		else if (strcmp(opt, "rw") == 0)

Error: COMPILER_WARNING (CWE-126): [#def11]
nfs-utils-2.8.2/support/nfs/getport.c:459:24: warning[-Wstringop-overread]: 'strndup' specified bound 108 exceeds source size 14
#  459 |                 return strndup(sun->sun_path, sizeof(sun->sun_path));
#      |                        ^
nfs-utils-2.8.2/support/nfs/getport.c: scope_hint: In function 'main'
nfs-utils-2.8.2/support/nfs/getport.c:1119:28: note: source object allocated here
# 1119 |         struct sockaddr_in addr = {
#      |                            ^
#  457|   	switch (sap->sa_family) {
#  458|   	case AF_LOCAL:
#  459|-> 		return strndup(sun->sun_path, sizeof(sun->sun_path));
#  460|   	case AF_INET:
#  461|   		if (inet_ntop(AF_INET, (const void *)&sin->sin_addr.s_addr,

Error: COMPILER_WARNING (CWE-126): [#def12]
nfs-utils-2.8.2/support/nfs/getport.c:459:24: warning[-Wstringop-overread]: 'strndup' specified bound 108 exceeds source size 26
#  459 |                 return strndup(sun->sun_path, sizeof(sun->sun_path));
#      |                        ^
nfs-utils-2.8.2/support/nsm/rpc.c: scope_hint: In function 'nsm_xmit_getaddr.constprop'
nfs-utils-2.8.2/support/nsm/rpc.c:231:29: note: source object allocated here
#  231 |         struct sockaddr_in6 addr;
#      |                             ^
#  457|   	switch (sap->sa_family) {
#  458|   	case AF_LOCAL:
#  459|-> 		return strndup(sun->sun_path, sizeof(sun->sun_path));
#  460|   	case AF_INET:
#  461|   		if (inet_ntop(AF_INET, (const void *)&sin->sin_addr.s_addr,

Error: GCC_ANALYZER_WARNING (CWE-479): [#def13]
nfs-utils-2.8.2/support/nfs/rpcmisc.c:56:25: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to 'exit' from within signal handler
nfs-utils-2.8.2/support/nfs/rpcmisc.c:47:1: enter_function: entry to 'closedown'
nfs-utils-2.8.2/support/nfs/rpcmisc.c:47:1: enter_function: entry to 'closedown'
nfs-utils-2.8.2/support/nfs/rpcmisc.c:51:12: branch_true: following 'true' branch...
nfs-utils-2.8.2/support/nfs/rpcmisc.c:55:21: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/rpcmisc.c:55:20: branch_true: following 'true' branch...
nfs-utils-2.8.2/support/nfs/rpcmisc.c:56:25: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/rpcmisc.c:56:25: danger: call to 'exit' from within signal handler
#   54|   
#   55|   		if (NFSCTL_TCPISSET(_rpcprotobits) == 0)
#   56|-> 			exit(0);
#   57|   
#   58|   		if (size == 0)

Error: GCC_ANALYZER_WARNING (CWE-479): [#def14]
nfs-utils-2.8.2/support/nfs/rpcmisc.c:65:25: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to 'exit' from within signal handler
nfs-utils-2.8.2/support/nfs/rpcmisc.c:47:1: enter_function: entry to 'closedown'
nfs-utils-2.8.2/support/nfs/rpcmisc.c:47:1: enter_function: entry to 'closedown'
nfs-utils-2.8.2/support/nfs/rpcmisc.c:51:12: branch_true: following 'true' branch...
nfs-utils-2.8.2/support/nfs/rpcmisc.c:55:21: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/rpcmisc.c:55:20: branch_false: following 'false' branch...
nfs-utils-2.8.2/support/nfs/rpcmisc.c:58:21: branch_false: ...to here
nfs-utils-2.8.2/support/nfs/rpcmisc.c:64:20: branch_true: following 'true' branch (when 'openfd != 2')...
nfs-utils-2.8.2/support/nfs/rpcmisc.c:65:25: branch_true: ...to here
nfs-utils-2.8.2/support/nfs/rpcmisc.c:65:25: danger: call to 'exit' from within signal handler
#   63|   				openfd++;
#   64|   		if (openfd <= 1)
#   65|-> 			exit(0);
#   66|   	}
#   67|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def15]
nfs-utils-2.8.2/support/nfs/xcommon.c:46:6: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
nfs-utils-2.8.2/support/nfs/xcommon.c:40:1: enter_function: entry to 'xstrconcat2'
nfs-utils-2.8.2/support/nfs/xcommon.c:45:12: call_function: calling 'xmalloc' from 'xstrconcat2'
nfs-utils-2.8.2/support/nfs/xcommon.c:45:12: return_function: returning to 'xstrconcat2' from 'xmalloc'
nfs-utils-2.8.2/support/nfs/xcommon.c:46:6: danger: argument 1 ('xmalloc(strlen(s) + strlen(t) + 1)') NULL where non-null expected
#argument 1 of '__builtin_strcpy' must be non-null
#   44|        if (!t) t = "";
#   45|        res = xmalloc(strlen(s) + strlen(t) + 1);
#   46|->      strcpy(res, s);
#   47|        strcat(res, t);
#   48|        return res;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def16]
nfs-utils-2.8.2/support/nfs/xcommon.c:62:6: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
nfs-utils-2.8.2/support/nfs/xcommon.c:53:1: enter_function: entry to 'xstrconcat3'
nfs-utils-2.8.2/support/nfs/xcommon.c:61:12: call_function: calling 'xmalloc' from 'xstrconcat3'
nfs-utils-2.8.2/support/nfs/xcommon.c:61:12: return_function: returning to 'xstrconcat3' from 'xmalloc'
nfs-utils-2.8.2/support/nfs/xcommon.c:62:6: danger: argument 1 ('xmalloc(strlen(s) + strlen(t) + strlen(u) + 1)') NULL where non-null expected
#argument 1 of '__builtin_strcpy' must be non-null
#   60|        if (!u) u = "";
#   61|        res = xmalloc(strlen(s) + strlen(t) + strlen(u) + 1);
#   62|->      strcpy(res, s);
#   63|        strcat(res, t);
#   64|        strcat(res, u);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def17]
nfs-utils-2.8.2/support/nfs/xcommon.c:82:6: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
nfs-utils-2.8.2/support/nfs/xcommon.c:72:1: enter_function: entry to 'xstrconcat4'
nfs-utils-2.8.2/support/nfs/xcommon.c:81:12: call_function: calling 'xmalloc' from 'xstrconcat4'
nfs-utils-2.8.2/support/nfs/xcommon.c:81:12: return_function: returning to 'xstrconcat4' from 'xmalloc'
nfs-utils-2.8.2/support/nfs/xcommon.c:82:6: danger: argument 1 ('xmalloc(strlen(s) + strlen(t) + strlen(u) + strlen(v) + 1)') NULL where non-null expected
#argument 1 of '__builtin_strcpy' must be non-null
#   80|        if (!v) v = "";
#   81|        res = xmalloc(strlen(s) + strlen(t) + strlen(u) + strlen(v) + 1);
#   82|->      strcpy(res, s);
#   83|        strcat(res, t);
#   84|        strcat(res, u);

Error: CPPCHECK_WARNING (CWE-457): [#def18]
nfs-utils-2.8.2/support/nfsidmap/libnfsidmap.c:416: error[uninitvar]: Uninitialized variable: r->field
#  414|   		if (local_realms) {
#  415|   			TAILQ_FOREACH(r, &local_realms->fields, link) {
#  416|-> 				siz += (strlen(r->field)+4);
#  417|   			}
#  418|   			buf = malloc(siz);

Error: GCC_ANALYZER_WARNING (CWE-122): [#def19]
nfs-utils-2.8.2/support/nfsidmap/libnfsidmap.c:420:33: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
nfs-utils-2.8.2/support/nfsidmap/libnfsidmap.c:694:5: enter_function: entry to 'nfs4_gss_princ_to_grouplist_ex'
nfs-utils-2.8.2/support/nfsidmap/libnfsidmap.c:697:9: call_function: calling 'nfs4_init_name_mapping' from 'nfs4_gss_princ_to_grouplist_ex'
#  418|   			buf = malloc(siz);
#  419|   			if (buf) {
#  420|-> 				*buf = 0;
#  421|   				TAILQ_FOREACH(r, &local_realms->fields, link) {
#  422|   					sprintf(buf+strlen(buf), "'%s' ", r->field);

Error: CPPCHECK_WARNING (CWE-457): [#def20]
nfs-utils-2.8.2/support/nfsidmap/nss.c:415: error[uninitvar]: Uninitialized variable: r->field
#  413|   	realms = get_local_realms();
#  414|   	TAILQ_FOREACH(r, &realms->fields, link) {
#  415|-> 		if (strcmp(r->field, princ_realm) == 0) {
#  416|   			found = 1;
#  417|   			break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
nfs-utils-2.8.2/systemd/systemd.c:69:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
nfs-utils-2.8.2/systemd/systemd.c:90:7: enter_function: entry to ‘systemd_escape’
nfs-utils-2.8.2/systemd/systemd.c:97:18: acquire_memory: this call could return NULL
nfs-utils-2.8.2/systemd/systemd.c:102:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/systemd/systemd.c:107:12: branch_false: ...to here
nfs-utils-2.8.2/systemd/systemd.c:107:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
nfs-utils-2.8.2/systemd/systemd.c:114:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/systemd/systemd.c:115:36: branch_true: ...to here
nfs-utils-2.8.2/systemd/systemd.c:117:20: branch_false: following ‘false’ branch (when ‘c != 47’)...
nfs-utils-2.8.2/systemd/systemd.c:123:28: branch_false: ...to here
nfs-utils-2.8.2/systemd/systemd.c:123:27: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/systemd/systemd.c:123:42: branch_false: ...to here
nfs-utils-2.8.2/systemd/systemd.c:128:29: call_function: inlined call to ‘hexify’ from ‘systemd_escape’
#   67|   static char *hexify(unsigned char c, char *p)
#   68|   {
#   69|-> 	*p++ = '\\';
#   70|   	*p++ = 'x';
#   71|   	*p++ = hex[c >> 4];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
nfs-utils-2.8.2/systemd/systemd.c:69:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
nfs-utils-2.8.2/systemd/systemd.c:97:18: acquire_memory: this call could return NULL
nfs-utils-2.8.2/systemd/systemd.c:102:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/systemd/systemd.c:107:12: branch_false: ...to here
nfs-utils-2.8.2/systemd/systemd.c:107:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/systemd/systemd.c:112:29: branch_true: ...to here
nfs-utils-2.8.2/systemd/systemd.c:112:21: call_function: inlined call to ‘hexify’ from ‘systemd_escape’
#   67|   static char *hexify(unsigned char c, char *p)
#   68|   {
#   69|-> 	*p++ = '\\';
#   70|   	*p++ = 'x';
#   71|   	*p++ = hex[c >> 4];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
nfs-utils-2.8.2/systemd/systemd.c:104:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
nfs-utils-2.8.2/systemd/systemd.c:97:18: acquire_memory: this call could return NULL
nfs-utils-2.8.2/systemd/systemd.c:102:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/systemd/systemd.c:104:18: branch_true: ...to here
nfs-utils-2.8.2/systemd/systemd.c:104:17: danger: ‘result’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  102|   	if (!*path) {
#  103|   		/* root directory "/" becomes is encoded as a single "-" */
#  104|-> 		*p++ = '-';
#  105|   		goto out;
#  106|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
nfs-utils-2.8.2/systemd/systemd.c:125:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
nfs-utils-2.8.2/systemd/systemd.c:97:18: acquire_memory: this call could return NULL
nfs-utils-2.8.2/systemd/systemd.c:102:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/systemd/systemd.c:107:12: branch_false: ...to here
nfs-utils-2.8.2/systemd/systemd.c:107:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
nfs-utils-2.8.2/systemd/systemd.c:114:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/systemd/systemd.c:115:36: branch_true: ...to here
nfs-utils-2.8.2/systemd/systemd.c:117:20: branch_false: following ‘false’ branch (when ‘c != 47’)...
nfs-utils-2.8.2/systemd/systemd.c:123:28: branch_false: ...to here
nfs-utils-2.8.2/systemd/systemd.c:125:25: danger: ‘p’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  123|   		} else if (isalnum(c) || c == ':' || c == '.' || c == '_')
#  124|   			/* these characters are not replaced */
#  125|-> 			*p++ = c;
#  126|   		else
#  127|   			/* replace with "\x2d" escape sequence */

Error: CPPCHECK_WARNING (CWE-476): [#def25]
nfs-utils-2.8.2/tools/nfsrahead/main.c:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#   35|   
#   36|   	maj_s = p = s;
#   37|-> 	for ( ; *p != ':' && *p != '\0'; p++)
#   38|   		;
#   39|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
nfs-utils-2.8.2/tools/nfsrahead/main.c:37:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
nfs-utils-2.8.2/tools/nfsrahead/main.c:136:5: enter_function: entry to ‘main’
nfs-utils-2.8.2/tools/nfsrahead/main.c:166:25: branch_true: following ‘true’ branch (when ‘retry != 11’)...
nfs-utils-2.8.2/tools/nfsrahead/main.c:167:48: branch_true: ...to here
nfs-utils-2.8.2/tools/nfsrahead/main.c:167:28: call_function: calling ‘get_device_info’ from ‘main’
#   35|   
#   36|   	maj_s = p = s;
#   37|-> 	for ( ; *p != ':' && *p != '\0'; p++)
#   38|   		;
#   39|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
nfs-utils-2.8.2/tools/nfsrahead/main.c:63:9: warning[-Wanalyzer-malloc-leak]: leak of ‘device.mountpoint’
nfs-utils-2.8.2/tools/nfsrahead/main.c:136:5: enter_function: entry to ‘main’
nfs-utils-2.8.2/tools/nfsrahead/main.c:166:25: branch_true: following ‘true’ branch (when ‘retry != 11’)...
nfs-utils-2.8.2/tools/nfsrahead/main.c:167:48: branch_true: ...to here
nfs-utils-2.8.2/tools/nfsrahead/main.c:167:28: call_function: calling ‘get_device_info’ from ‘main’
#   61|   	di->device_number = strdup(device_number);
#   62|   	di->dev = 0;
#   63|-> 	di->mountpoint = NULL;
#   64|   	di->fstype = NULL;
#   65|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
nfs-utils-2.8.2/tools/nfsrahead/main.c:64:9: warning[-Wanalyzer-malloc-leak]: leak of ‘device.fstype’
nfs-utils-2.8.2/tools/nfsrahead/main.c:136:5: enter_function: entry to ‘main’
nfs-utils-2.8.2/tools/nfsrahead/main.c:166:25: branch_true: following ‘true’ branch (when ‘retry != 11’)...
nfs-utils-2.8.2/tools/nfsrahead/main.c:167:48: branch_true: ...to here
nfs-utils-2.8.2/tools/nfsrahead/main.c:167:28: call_function: calling ‘get_device_info’ from ‘main’
#   62|   	di->dev = 0;
#   63|   	di->mountpoint = NULL;
#   64|-> 	di->fstype = NULL;
#   65|   }
#   66|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def29]
nfs-utils-2.8.2/utils/blkmapd/device-process.c:291:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*vol_70->bv_vols’
nfs-utils-2.8.2/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.2/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.2/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.2/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.2/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.2/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.2/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.2/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.2/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
 branch_false: ...to here
nfs-utils-2.8.2/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.2/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.2/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  289|   			}
#  290|   		}
#  291|-> 		vol->bv_size = vol->bv_vols[0]->bv_size * vol->bv_vol_n;
#  292|   		break;
#  293|   	case BLOCK_VOLUME_CONCAT:

Error: GCC_ANALYZER_WARNING (CWE-457): [#def30]
nfs-utils-2.8.2/utils/blkmapd/dm-device.c:429:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pos’
nfs-utils-2.8.2/utils/blkmapd/dm-device.c:370:10: enter_function: entry to ‘dm_device_create’
nfs-utils-2.8.2/utils/blkmapd/dm-device.c:383:26: branch_true: following ‘true’ branch (when ‘volnum < num_vols’)...
nfs-utils-2.8.2/utils/blkmapd/dm-device.c:384:29: branch_true: ...to here
nfs-utils-2.8.2/utils/blkmapd/dm-device.c:417:33: call_function: inlined call to ‘bl_dm_table_alloc’ from ‘dm_device_create’
nfs-utils-2.8.2/utils/blkmapd/dm-device.c:418:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/blkmapd/dm-device.c:422:39: branch_false: ...to here
nfs-utils-2.8.2/utils/blkmapd/dm-device.c:429:31: danger: use of uninitialized value ‘pos’ here
#  427|   				(long long unsigned) stripe_unit, &pos);
#  428|   			/* Copy subdev major:minor to params */
#  429|-> 			tmp = table->params + pos;
#  430|   			len = DM_PARAMS_LEN - pos;
#  431|   			for (i = 0; i < node->bv_vol_n; i++) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def31]
nfs-utils-2.8.2/utils/gssd/gssd.c:370:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘program’
nfs-utils-2.8.2/utils/gssd/gssd.c:946:1: enter_function: entry to ‘gssd_inotify_cb’
nfs-utils-2.8.2/utils/gssd/gssd.c:962:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:965:33: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:969:29: branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:969:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:975:25: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:975:25: branch_true: following ‘true’ branch (when ‘tdi’ is non-NULL)...
nfs-utils-2.8.2/utils/gssd/gssd.c:976:37: branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:976:36: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:977:46: branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:977:46: call_function: calling ‘gssd_inotify_topdir’ from ‘gssd_inotify_cb’
#  368|   	clp->upcall_address = address ? strdup(address) : NULL;
#  369|   	clp->upcall_port = port ? strdup(port) : NULL;
#  370|-> 	clp->upcall_program = program;
#  371|   	clp->upcall_vers = version;
#  372|   	clp->upcall_protoname = protoname ? strdup(protoname) : NULL;

Error: GCC_ANALYZER_WARNING (CWE-416): [#def32]
nfs-utils-2.8.2/utils/gssd/gssd.c:436:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘clp’
nfs-utils-2.8.2/utils/gssd/gssd.c:1070:1: enter_function: entry to ‘main’
nfs-utils-2.8.2/utils/gssd/gssd.c:1162:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1169:13: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1169:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1177:13: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1177:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1185:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1191:37: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1192:23: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1207:13: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1207:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1210:25: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1237:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1241:13: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1241:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1244:18: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1245:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1250:22: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1251:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1256:21: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1257:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1262:22: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1263:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1268:9: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1271:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1275:9: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1278:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1282:9: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1286:14: call_function: calling ‘start_watchdog_thread’ from ‘main’
nfs-utils-2.8.2/utils/gssd/gssd.c:1286:14: return_function: returning to ‘main’ from ‘start_watchdog_thread’
nfs-utils-2.8.2/utils/gssd/gssd.c:1287:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1292:9: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1293:9: call_function: calling ‘gssd_scan’ from ‘main’
nfs-utils-2.8.2/utils/gssd/gssd.c:1293:9: return_function: returning to ‘main’ from ‘gssd_scan’
nfs-utils-2.8.2/utils/gssd/gssd.c:1302:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1304:17: branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1305:24: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1307:25: branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1307:25: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1307:25: branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1308:25: call_function: calling ‘gssd_destroy_client’ from ‘main’
nfs-utils-2.8.2/utils/gssd/gssd.c:1308:25: return_function: returning to ‘main’ from ‘gssd_destroy_client’
nfs-utils-2.8.2/utils/gssd/gssd.c:1305:24: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1307:25: branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1308:25: call_function: calling ‘gssd_destroy_client’ from ‘main’
#  434|   gssd_destroy_client(struct clnt_info *clp)
#  435|   {
#  436|-> 	printerr(4, "destroying client %s\n", clp->relpath);
#  437|   
#  438|   	if (clp->krb5_ev) {

Error: GCC_ANALYZER_WARNING (CWE-479): [#def33]
nfs-utils-2.8.2/utils/gssd/gssd.c:1011:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
nfs-utils-2.8.2/utils/gssd/gssd.c:1070:1: enter_function: entry to ‘main’
nfs-utils-2.8.2/utils/gssd/gssd.c:1197:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1202:17: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1207:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1210:25: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1225:12: branch_false: following ‘false’ branch (when ‘rpc_verbosity <= 0’)...
nfs-utils-2.8.2/utils/gssd/gssd.c:1233:9: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1237:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1241:13: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1241:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1244:18: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1245:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1250:22: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1251:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1256:21: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1257:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1262:22: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1263:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1268:9: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1006:1: enter_function: entry to ‘sig_die’
nfs-utils-2.8.2/utils/gssd/gssd.c:1008:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/gssd/gssd.c:1009:17: branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/gssd.c:1011:17: danger: call to ‘exit’ from within signal handler
# 1009|   		gssd_destroy_krb5_principals(root_uses_machine_creds);
# 1010|   		printerr(1, "forced exiting on signal %d\n", signal);
# 1011|-> 		exit(0);
# 1012|   	}
# 1013|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def34]
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1162:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘kte.principal’
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1443:1: enter_function: entry to ‘gssd_refresh_krb5_machine_credential’
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1447:12: call_function: calling ‘gssd_refresh_krb5_machine_credential_internal’ from ‘gssd_refresh_krb5_machine_credential’
# 1160|   		}
# 1161|   
# 1162|-> 		ple = get_ple_by_princ(context, kte.principal);
# 1163|   		k5_free_kt_entry(context, &kte);
# 1164|   		if (ple == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-416): [#def35]
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1355:38: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘ple’
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1297:1: enter_function: entry to ‘gssd_get_krb5_machine_cred_list’
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1310:12: branch_false: following ‘false’ branch (when ‘l’ is non-NULL)...
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1315:9: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1316:43: branch_true: following ‘true’ branch (when ‘ple’ is non-NULL)...
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1317:22: branch_true: ...to here
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1317:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1328:17: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1331:26: call_function: calling ‘gssd_refresh_krb5_machine_credential_internal’ from ‘gssd_get_krb5_machine_cred_list’
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1331:26: return_function: returning to ‘gssd_get_krb5_machine_cred_list’ from ‘gssd_refresh_krb5_machine_credential_internal’
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1334:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1341:20: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1341:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1343:20: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1343:20: branch_false: following ‘false’ branch (when ‘listsize > i’)...
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1355:38: branch_false: ...to here
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1355:38: danger: use after ‘free’ of ‘ple’; freed at [(33)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/32)
# 1353|   			l = tmplist;
# 1354|   		}
# 1355|-> 		if ((l[i++] = strdup(ple->ccname)) == NULL) {
# 1356|   			gssd_free_krb5_machine_cred_list(l);
# 1357|   			retval = ENOMEM;

Error: CPPCHECK_WARNING (CWE-401): [#def36]
nfs-utils-2.8.2/utils/gssd/krb5_util.c:1593: error[memleakOnRealloc]: Common realloc mistake: 'allowed_enctypes' nulled but not freed upon failure
# 1591|   	if (allowed_etypes) {
# 1592|   		TAILQ_FOREACH(node, &(allowed_etypes->fields), link) {
# 1593|-> 			allowed_enctypes = realloc(allowed_enctypes,
# 1594|   						   (num_allowed_enctypes + 1) *
# 1595|   						   sizeof(*allowed_enctypes));

Error: CPPCHECK_WARNING (CWE-476): [#def37]
nfs-utils-2.8.2/utils/mount/configfile.c:122: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: value
#  120|   	char *ch;
#  121|   
#  122|-> 	ch = &value[strlen(value)-1];
#  123|   	switch (tolower(*ch)) {
#  124|   	case 'k':

Error: GCC_ANALYZER_WARNING (CWE-688): [#def38]
nfs-utils-2.8.2/utils/mount/configfile.c:122:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘value’ where non-null expected
nfs-utils-2.8.2/utils/mount/configfile.c:295:7: enter_function: entry to ‘conf_get_mntopts’
nfs-utils-2.8.2/utils/mount/configfile.c:303:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/configfile.c:311:9: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/configfile.c:311:9: call_function: calling ‘conf_parse_mntopts’ from ‘conf_get_mntopts’
#argument 1 of ‘__builtin_strlen’ must be non-null
#  120|   	char *ch;
#  121|   
#  122|-> 	ch = &value[strlen(value)-1];
#  123|   	switch (tolower(*ch)) {
#  124|   	case 'k':

Error: GCC_ANALYZER_WARNING (CWE-688): [#def39]
nfs-utils-2.8.2/utils/mount/mount_libmount.c:129:18: warning[-Wanalyzer-null-argument]: use of NULL ‘type’ where non-null expected
nfs-utils-2.8.2/utils/mount/mount_libmount.c:286:12: enter_function: entry to ‘mount_main’
nfs-utils-2.8.2/utils/mount/mount_libmount.c:329:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:330:29: branch_true: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:331:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:332:36: branch_true: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:334:12: branch_false: following ‘false’ branch (when ‘mount_point’ is non-NULL)...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:339:12: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:339:12: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:344:13: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:344:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:350:19: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:360:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:361:17: branch_true: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:371:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:382:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:383:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:391:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:392:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:399:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:400:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:406:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:406:14: call_function: calling ‘try_mount’ from ‘mount_main’
#  127|   		ret = nfsmount_string(src, tgt, type, flags, &opts, fake, bg);
#  128|   
#  129|-> 	else if (strcmp(type, "nfs4") == 0)
#  130|   		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else

Error: GCC_ANALYZER_WARNING (CWE-688): [#def40]
nfs-utils-2.8.2/utils/mount/mount_libmount.c:129:18: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘type’ where non-null expected
nfs-utils-2.8.2/utils/mount/mount_libmount.c:286:12: enter_function: entry to ‘mount_main’
nfs-utils-2.8.2/utils/mount/mount_libmount.c:329:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:330:29: branch_true: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:331:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:332:36: branch_true: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:334:12: branch_false: following ‘false’ branch (when ‘mount_point’ is non-NULL)...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:339:12: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:339:12: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:344:13: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:344:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:350:19: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:360:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:361:17: branch_true: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:371:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:382:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:383:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:391:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:392:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:399:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:400:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mount/mount_libmount.c:406:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mount/mount_libmount.c:406:14: call_function: calling ‘try_mount’ from ‘mount_main’
#  127|   		ret = nfsmount_string(src, tgt, type, flags, &opts, fake, bg);
#  128|   
#  129|-> 	else if (strcmp(type, "nfs4") == 0)
#  130|   		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else

Error: GCC_ANALYZER_WARNING: [#def41]
nfs-utils-2.8.2/utils/mountd/mountd.c:829:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’
nfs-utils-2.8.2/utils/mountd/mountd.c:642:1: enter_function: entry to ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:662:9: call_function: calling ‘read_mountd_conf’ from ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:662:9: return_function: returning to ‘main’ from ‘read_mountd_conf’
nfs-utils-2.8.2/utils/mountd/mountd.c:760:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:760:32: call_function: inlined call to ‘version_any’ from ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:760:13: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:764:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:764:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:766:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:766:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:769:13: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:817:12: branch_true: following ‘true’ branch (when ‘foreground == 0’)...
nfs-utils-2.8.2/utils/mountd/mountd.c:819:26: branch_true: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:819:20: branch_false: following ‘false’ branch (when ‘c <= 0’)...
nfs-utils-2.8.2/utils/mountd/mountd.c:821:20: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:828:34: acquire_resource: opened here
nfs-utils-2.8.2/utils/mountd/mountd.c:829:32: danger: ‘open("/dev/null", 2)’ could be invalid: unchecked value from [(20)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/19)
#  827|   		{
#  828|   			int fd = open("/dev/null", O_RDWR);
#  829|-> 			(void) dup2(fd, 0);
#  830|   			(void) dup2(fd, 1);
#  831|   			(void) dup2(fd, 2);

Error: GCC_ANALYZER_WARNING: [#def42]
nfs-utils-2.8.2/utils/mountd/mountd.c:830:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’
nfs-utils-2.8.2/utils/mountd/mountd.c:642:1: enter_function: entry to ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:662:9: call_function: calling ‘read_mountd_conf’ from ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:662:9: return_function: returning to ‘main’ from ‘read_mountd_conf’
nfs-utils-2.8.2/utils/mountd/mountd.c:760:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:760:32: call_function: inlined call to ‘version_any’ from ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:760:13: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:764:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:764:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:766:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:766:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:769:13: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:817:12: branch_true: following ‘true’ branch (when ‘foreground == 0’)...
nfs-utils-2.8.2/utils/mountd/mountd.c:819:26: branch_true: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:819:20: branch_false: following ‘false’ branch (when ‘c <= 0’)...
nfs-utils-2.8.2/utils/mountd/mountd.c:821:20: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:828:34: acquire_resource: opened here
nfs-utils-2.8.2/utils/mountd/mountd.c:830:32: danger: ‘open("/dev/null", 2)’ could be invalid: unchecked value from [(20)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/19)
#  828|   			int fd = open("/dev/null", O_RDWR);
#  829|   			(void) dup2(fd, 0);
#  830|-> 			(void) dup2(fd, 1);
#  831|   			(void) dup2(fd, 2);
#  832|   			if (fd > 2) (void) close(fd);

Error: GCC_ANALYZER_WARNING: [#def43]
nfs-utils-2.8.2/utils/mountd/mountd.c:831:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’
nfs-utils-2.8.2/utils/mountd/mountd.c:642:1: enter_function: entry to ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:662:9: call_function: calling ‘read_mountd_conf’ from ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:662:9: return_function: returning to ‘main’ from ‘read_mountd_conf’
nfs-utils-2.8.2/utils/mountd/mountd.c:760:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:760:32: call_function: inlined call to ‘version_any’ from ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:760:13: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:764:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:764:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:766:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:766:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:769:13: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:817:12: branch_true: following ‘true’ branch (when ‘foreground == 0’)...
nfs-utils-2.8.2/utils/mountd/mountd.c:819:26: branch_true: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:819:20: branch_false: following ‘false’ branch (when ‘c <= 0’)...
nfs-utils-2.8.2/utils/mountd/mountd.c:821:20: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:828:34: acquire_resource: opened here
nfs-utils-2.8.2/utils/mountd/mountd.c:831:32: danger: ‘open("/dev/null", 2)’ could be invalid: unchecked value from [(20)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/19)
#  829|   			(void) dup2(fd, 0);
#  830|   			(void) dup2(fd, 1);
#  831|-> 			(void) dup2(fd, 2);
#  832|   			if (fd > 2) (void) close(fd);
#  833|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
nfs-utils-2.8.2/utils/mountd/mountd.c:832:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
nfs-utils-2.8.2/utils/mountd/mountd.c:642:1: enter_function: entry to ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:662:9: call_function: calling ‘read_mountd_conf’ from ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:662:9: return_function: returning to ‘main’ from ‘read_mountd_conf’
nfs-utils-2.8.2/utils/mountd/mountd.c:760:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:760:32: call_function: inlined call to ‘version_any’ from ‘main’
nfs-utils-2.8.2/utils/mountd/mountd.c:760:13: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:764:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:764:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:766:14: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:766:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/mountd/mountd.c:769:13: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:817:12: branch_true: following ‘true’ branch (when ‘foreground == 0’)...
nfs-utils-2.8.2/utils/mountd/mountd.c:819:26: branch_true: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:819:20: branch_false: following ‘false’ branch (when ‘c <= 0’)...
nfs-utils-2.8.2/utils/mountd/mountd.c:821:20: branch_false: ...to here
nfs-utils-2.8.2/utils/mountd/mountd.c:828:34: acquire_resource: opened here
nfs-utils-2.8.2/utils/mountd/mountd.c:832:28: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(20)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/19)
#  830|   			(void) dup2(fd, 1);
#  831|   			(void) dup2(fd, 2);
#  832|-> 			if (fd > 2) (void) close(fd);
#  833|   		}
#  834|   		setsid();

Error: CPPCHECK_WARNING (CWE-401): [#def45]
nfs-utils-2.8.2/utils/nfsd/nfsd.c:168: error[memleakOnRealloc]: Common realloc mistake: 'haddr' nulled but not freed upon failure
#  166|   	if (hosts && hosts->cnt) {
#  167|   		struct conf_list_node *n;
#  168|-> 		haddr = realloc(haddr, sizeof(char*) * hosts->cnt);
#  169|   		TAILQ_FOREACH(n, &(hosts->fields), link) {
#  170|   			haddr[hcounter] = n->field;

Error: CPPCHECK_WARNING (CWE-457): [#def46]
nfs-utils-2.8.2/utils/nfsd/nfsd.c:170: error[uninitvar]: Uninitialized variable: n->field
#  168|   		haddr = realloc(haddr, sizeof(char*) * hosts->cnt);
#  169|   		TAILQ_FOREACH(n, &(hosts->fields), link) {
#  170|-> 			haddr[hcounter] = n->field;
#  171|   			hcounter++;
#  172|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
nfs-utils-2.8.2/utils/nfsd/nfsd.c:170:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘haddr’
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:21: branch_true: following ‘true’ branch (when ‘i != 5’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:123:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:126:28: branch_false: following ‘false’ branch (when ‘i != 4’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:29: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:140:33: branch_true: following ‘true’ branch (when ‘i != 32’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:142:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:166:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:169:17: branch_true: following ‘true’ branch (when ‘n’ is non-NULL)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:170:30: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:170:30: release_memory: ‘haddr’ is NULL
nfs-utils-2.8.2/utils/nfsd/nfsd.c:170:25: danger: dereference of NULL ‘haddr + (long unsigned int)hcounter * 8’
#  168|   		haddr = realloc(haddr, sizeof(char*) * hosts->cnt);
#  169|   		TAILQ_FOREACH(n, &(hosts->fields), link) {
#  170|-> 			haddr[hcounter] = n->field;
#  171|   			hcounter++;
#  172|   		}

Error: GCC_ANALYZER_WARNING (CWE-131): [#def48]
nfs-utils-2.8.2/utils/nfsd/nfsd.c:187:41: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:21: branch_true: following ‘true’ branch (when ‘i != 5’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:123:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:126:28: branch_false: following ‘false’ branch (when ‘i != 4’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:29: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:140:33: branch_true: following ‘true’ branch (when ‘i != 32’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:142:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:176:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:177:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:176:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:177:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:182:28: branch_false: following ‘false’ branch (when ‘hosts’ is NULL)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:186:28: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:186:28: branch_true: following ‘true’ branch (when ‘hcounter != 0’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:187:56: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:187:41: danger: allocated ‘(long unsigned int)hcounter * 8 + 1’ bytes and assigned to ‘char **’ here; ‘sizeof (char *)’ is ‘8’
#  185|   			}
#  186|   			if (hcounter) {
#  187|-> 				haddr = realloc(haddr, sizeof(char*) * hcounter+1);
#  188|   				if(!haddr) {
#  189|   					fprintf(stderr, "%s: unable to allocate "

Error: GCC_ANALYZER_WARNING (CWE-476): [#def49]
nfs-utils-2.8.2/utils/nfsd/nfsd.c:194:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘haddr’
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:21: branch_true: following ‘true’ branch (when ‘i != 5’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:123:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:126:28: branch_false: following ‘false’ branch (when ‘i != 4’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:29: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:140:33: branch_true: following ‘true’ branch (when ‘i != 32’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:142:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:166:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:169:17: branch_false: following ‘false’ branch (when ‘n’ is NULL)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:174:17: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:176:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:177:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:182:28: branch_true: following ‘true’ branch (when ‘hosts’ is non-NULL)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:194:30: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:194:30: release_memory: ‘haddr’ is NULL
nfs-utils-2.8.2/utils/nfsd/nfsd.c:194:30: release_memory: ‘haddr’ is NULL
nfs-utils-2.8.2/utils/nfsd/nfsd.c:194:25: danger: dereference of NULL ‘haddr + (long unsigned int)hcounter * 8’
#  192|   				}
#  193|   			}
#  194|-> 			haddr[hcounter] = optarg;
#  195|   			hcounter++;
#  196|   			break;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def50]
nfs-utils-2.8.2/utils/nfsd/nfsd.c:194:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:21: branch_true: following ‘true’ branch (when ‘i != 5’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:123:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:126:28: branch_false: following ‘false’ branch (when ‘i != 4’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:29: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:140:33: branch_true: following ‘true’ branch (when ‘i != 32’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:142:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:176:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:177:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:176:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:177:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:182:28: branch_false: following ‘false’ branch (when ‘hosts’ is NULL)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:186:28: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:186:28: branch_true: following ‘true’ branch (when ‘hcounter != 0’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:187:56: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:188:35: branch_false: following ‘false’ branch (when ‘haddr’ is non-NULL)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:194:30: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:194:25: danger: write of 8 bytes at offset ‘(long unsigned int)hcounter * 8’ exceeds the buffer
#  192|   				}
#  193|   			}
#  194|-> 			haddr[hcounter] = optarg;
#  195|   			hcounter++;
#  196|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
nfs-utils-2.8.2/utils/nfsd/nfsd.c:439:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:21: branch_true: following ‘true’ branch (when ‘i != 5’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:123:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:126:28: branch_false: following ‘false’ branch (when ‘i != 4’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:121:29: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:140:33: branch_true: following ‘true’ branch (when ‘i != 32’)...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:142:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:312:27: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:318:25: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:430:14: acquire_resource: opened here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:431:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsd/nfsd.c:435:17: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsd/nfsd.c:439:24: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  437|   		(void) dup2(fd, 0);
#  438|   		(void) dup2(fd, 1);
#  439|-> 		(void) dup2(fd, 2);
#  440|   	}
#  441|   	closeall(3);

Error: GCC_ANALYZER_WARNING (CWE-479): [#def52]
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:99:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:801:1: enter_function: entry to ‘main’
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:827:9: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:872:20: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:879:14: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:879:14: call_function: calling ‘cld_set_caps’ from ‘main’
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:879:14: return_function: returning to ‘main’ from ‘cld_set_caps’
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:880:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:891:13: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:909:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:913:14: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:914:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:920:14: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:920:14: call_function: calling ‘cld_pipe_init’ from ‘main’
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:920:14: return_function: returning to ‘main’ from ‘cld_pipe_init’
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:921:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:924:9: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:95:1: enter_function: entry to ‘sig_die’
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:97:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:98:17: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:99:17: danger: call to ‘exit’ from within signal handler
#   97|   	if (signal_received) {
#   98|   		xlog(D_GENERAL, "forced exiting on signal %d\n", signal);
#   99|-> 		exit(0);
#  100|   	}
#  101|   

Error: CPPCHECK_WARNING (CWE-401): [#def53]
nfs-utils-2.8.2/utils/nfsdcld/nfsdcld.c:825: error[memleak]: Memory leak: progname
#  823|   	if (evbase == NULL) {
#  824|   		fprintf(stderr, "%s: unable to allocate event base.\n", argv[0]);
#  825|-> 		return 1;
#  826|   	}
#  827|   	xlog_syslog(0);

Error: COMPILER_WARNING (CWE-563): [#def54]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c: scope_hint: In function ‘lockd_configure’
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1420:13: warning[-Wunused-variable]: unused variable ‘ret’
# 1420 |         int ret;
#      |             ^~~
# 1418|   	char *tcp_svc, *udp_svc;
# 1419|   	int tcpport = 0, udpport = 0;
# 1420|-> 	int ret;
# 1421|   
# 1422|   	tcp_svc = conf_get_str("lockd", "port");

Error: CPPCHECK_WARNING (CWE-758): [#def55]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1434: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
# 1432|   		if (udpport < 0)
# 1433|   			return 1;
# 1434|-> 	}
# 1435|   }
# 1436|   

Error: COMPILER_WARNING (CWE-393): [#def56]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c: scope_hint: In function ‘lockd_configure’
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1435:1: warning[-Wreturn-type]: control reaches end of non-void function
# 1435 | }
#      | ^
# 1433|   			return 1;
# 1434|   	}
# 1435|-> }
# 1436|   
# 1437|   static int

Error: CPPCHECK_WARNING (CWE-457): [#def57]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1542: warning[uninitvar]: Uninitialized variable: rdma_port
# 1540|   
# 1541|   	/* backward compatibility - nfs.conf used to set rdma port directly */
# 1542|-> 	if (!rdma_port)
# 1543|   		rdma_port = conf_get_str("nfsd", "rdma");
# 1544|   

Error: CPPCHECK_WARNING (CWE-457): [#def58]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1550: error[uninitvar]: Uninitialized variable: n->field
# 1548|   		TAILQ_FOREACH(n, &(hosts->fields), link) {
# 1549|   			if (udp)
# 1550|-> 				ret = add_listener("udp", n->field, port);
# 1551|   			if (tcp)
# 1552|   				ret = add_listener("tcp", n->field, port);

Error: CPPCHECK_WARNING (CWE-457): [#def59]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1650: error[uninitvar]: Uninitialized variable: n->field
# 1648|   			char *endptr = NULL;
# 1649|   
# 1650|-> 			threads[idx++] = strtol(n->field, &endptr, 0);
# 1651|   			if (!endptr || *endptr != '\0') {
# 1652|   				xlog(L_ERROR, "Invalid threads value %s.", n->field);

Error: COMPILER_WARNING (CWE-563): [#def60]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1679:14: warning[-Wunused-variable]: unused variable ‘threads’
# 1679 |         int *threads, grace, lease, idx, ret, opt, pools;
#      |              ^~~~~~~
# 1677|   static int nlm_func(struct nl_sock *sock, int argc, char ** argv)
# 1678|   {
# 1679|-> 	int *threads, grace, lease, idx, ret, opt, pools;
# 1680|   	struct conf_list *thread_str;
# 1681|   	struct conf_list_node *n;

Error: COMPILER_WARNING (CWE-563): [#def61]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1679:23: warning[-Wunused-variable]: unused variable ‘grace’
# 1679 |         int *threads, grace, lease, idx, ret, opt, pools;
#      |                       ^~~~~
# 1677|   static int nlm_func(struct nl_sock *sock, int argc, char ** argv)
# 1678|   {
# 1679|-> 	int *threads, grace, lease, idx, ret, opt, pools;
# 1680|   	struct conf_list *thread_str;
# 1681|   	struct conf_list_node *n;

Error: COMPILER_WARNING (CWE-563): [#def62]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1679:30: warning[-Wunused-variable]: unused variable ‘lease’
# 1679 |         int *threads, grace, lease, idx, ret, opt, pools;
#      |                              ^~~~~
# 1677|   static int nlm_func(struct nl_sock *sock, int argc, char ** argv)
# 1678|   {
# 1679|-> 	int *threads, grace, lease, idx, ret, opt, pools;
# 1680|   	struct conf_list *thread_str;
# 1681|   	struct conf_list_node *n;

Error: COMPILER_WARNING (CWE-563): [#def63]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1679:37: warning[-Wunused-variable]: unused variable ‘idx’
# 1679 |         int *threads, grace, lease, idx, ret, opt, pools;
#      |                                     ^~~
# 1677|   static int nlm_func(struct nl_sock *sock, int argc, char ** argv)
# 1678|   {
# 1679|-> 	int *threads, grace, lease, idx, ret, opt, pools;
# 1680|   	struct conf_list *thread_str;
# 1681|   	struct conf_list_node *n;

Error: COMPILER_WARNING (CWE-563): [#def64]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1679:42: warning[-Wunused-variable]: unused variable ‘ret’
# 1679 |         int *threads, grace, lease, idx, ret, opt, pools;
#      |                                          ^~~
# 1677|   static int nlm_func(struct nl_sock *sock, int argc, char ** argv)
# 1678|   {
# 1679|-> 	int *threads, grace, lease, idx, ret, opt, pools;
# 1680|   	struct conf_list *thread_str;
# 1681|   	struct conf_list_node *n;

Error: COMPILER_WARNING (CWE-563): [#def65]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1679:52: warning[-Wunused-variable]: unused variable ‘pools’
# 1679 |         int *threads, grace, lease, idx, ret, opt, pools;
#      |                                                    ^~~~~
# 1677|   static int nlm_func(struct nl_sock *sock, int argc, char ** argv)
# 1678|   {
# 1679|-> 	int *threads, grace, lease, idx, ret, opt, pools;
# 1680|   	struct conf_list *thread_str;
# 1681|   	struct conf_list_node *n;

Error: COMPILER_WARNING (CWE-563): [#def66]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1680:27: warning[-Wunused-variable]: unused variable ‘thread_str’
# 1680 |         struct conf_list *thread_str;
#      |                           ^~~~~~~~~~
# 1678|   {
# 1679|   	int *threads, grace, lease, idx, ret, opt, pools;
# 1680|-> 	struct conf_list *thread_str;
# 1681|   	struct conf_list_node *n;
# 1682|   	char *scope, *pool_mode;

Error: COMPILER_WARNING (CWE-563): [#def67]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1681:32: warning[-Wunused-variable]: unused variable ‘n’
# 1681 |         struct conf_list_node *n;
#      |                                ^
# 1679|   	int *threads, grace, lease, idx, ret, opt, pools;
# 1680|   	struct conf_list *thread_str;
# 1681|-> 	struct conf_list_node *n;
# 1682|   	char *scope, *pool_mode;
# 1683|   

Error: COMPILER_WARNING (CWE-563): [#def68]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1682:15: warning[-Wunused-variable]: unused variable ‘scope’
# 1682 |         char *scope, *pool_mode;
#      |               ^~~~~
# 1680|   	struct conf_list *thread_str;
# 1681|   	struct conf_list_node *n;
# 1682|-> 	char *scope, *pool_mode;
# 1683|   
# 1684|   	optind = 1;

Error: COMPILER_WARNING (CWE-563): [#def69]
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c: scope_hint: In function ‘nlm_func’
nfs-utils-2.8.2/utils/nfsdctl/nfsdctl.c:1682:23: warning[-Wunused-variable]: unused variable ‘pool_mode’
# 1682 |         char *scope, *pool_mode;
#      |                       ^~~~~~~~~
# 1680|   	struct conf_list *thread_str;
# 1681|   	struct conf_list_node *n;
# 1682|-> 	char *scope, *pool_mode;
# 1683|   
# 1684|   	optind = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def70]
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:317:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:293:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:298:15: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:299:21: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:299:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:303:28: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:303:20: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:310:21: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:310:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:313:21: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:313:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:316:21: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:316:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:317:26: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:317:25: danger: dereference of NULL ‘strchr(&buf, 10)’
#  315|   
#  316|   		if (verbose) {
#  317|-> 			*(strchr(buf, '\n')) = '\0';
#  318|   			xlog_warn("invalidating '%s'", buf);
#  319|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def71]
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:323:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:293:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:298:15: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:299:21: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:299:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:303:28: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:303:20: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:310:21: branch_true: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:310:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:313:21: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:313:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:316:21: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:323:17: danger: dereference of NULL ‘strchr(&buf, 32)’
#  321|   		 * The key is the first arugment in the string
#  322|   		 */
#  323|-> 		*(strchr(buf, ' ')) = '\0';
#  324|   		sscanf(buf, "%x", &key);
#  325|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def72]
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:463:13: warning[-Wanalyzer-null-argument]: use of NULL ‘type’ where non-null expected
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:411:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:416:19: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:416:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:420:13: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:423:12: branch_false: following ‘false’ branch (when ‘display == 0’)...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:425:12: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:425:12: branch_false: following ‘false’ branch (when ‘list == 0’)...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:427:12: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:427:12: branch_false: following ‘false’ branch (when ‘keystr’ is NULL)...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:430:12: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:430:12: branch_false: following ‘false’ branch (when ‘clearing == 0’)...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:435:9: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:436:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:442:13: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:450:12: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:455:13: branch_false: ...to here
nfs-utils-2.8.2/utils/nfsidmap/nfsidmap.c:463:13: danger: argument 1 (‘type’) NULL where non-null expected
#  461|   	request_key("keyring", DEFAULT_KEYRING, NULL, KEY_SPEC_THREAD_KEYRING);
#  462|   
#  463|-> 	if (strcmp(type, "uid") == 0)
#  464|   		rc = id_lookup(value, key, USER);
#  465|   	else if (strcmp(type, "gid") == 0)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def73]
nfs-utils-2.8.2/utils/showmount/showmount.c:315:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘dumpv’ where non-null expected
nfs-utils-2.8.2/utils/showmount/showmount.c:180:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/showmount/showmount.c:196:19: branch_false: ...to here
nfs-utils-2.8.2/utils/showmount/showmount.c:198:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/showmount/showmount.c:204:9: branch_false: ...to here
nfs-utils-2.8.2/utils/showmount/showmount.c:264:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/showmount/showmount.c:269:9: branch_false: ...to here
nfs-utils-2.8.2/utils/showmount/showmount.c:274:27: acquire_memory: this call could return NULL
nfs-utils-2.8.2/utils/showmount/showmount.c:275:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/showmount/showmount.c:281:13: branch_false: ...to here
nfs-utils-2.8.2/utils/showmount/showmount.c:289:17: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/showmount/showmount.c:306:18: branch_false: ...to here
nfs-utils-2.8.2/utils/showmount/showmount.c:306:17: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/showmount/showmount.c:315:9: branch_false: ...to here
nfs-utils-2.8.2/utils/showmount/showmount.c:315:9: danger: argument 1 (‘dumpv’) from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#  313|   	}
#  314|   
#  315|-> 	qsort(dumpv, n, sizeof (char *), dump_cmp);
#  316|   	
#  317|   	for (i = 0; i < n; i++) {

Error: GCC_ANALYZER_WARNING (CWE-479): [#def74]
nfs-utils-2.8.2/utils/statd/statd.c:108:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
nfs-utils-2.8.2/utils/statd/statd.c:279:5: enter_function: entry to ‘main’
nfs-utils-2.8.2/utils/statd/statd.c:392:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/statd/statd.c:397:13: branch_false: ...to here
nfs-utils-2.8.2/utils/statd/statd.c:402:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.2/utils/statd/statd.c:408:14: branch_false: ...to here
nfs-utils-2.8.2/utils/statd/statd.c:104:1: enter_function: entry to ‘killer’
nfs-utils-2.8.2/utils/statd/statd.c:108:9: danger: call to ‘exit’ from within signal handler
#  106|   	statd_unregister ();
#  107|   	xlog(D_GENERAL, "Caught signal %d, un-registering and exiting", sig);
#  108|-> 	exit(0);
#  109|   }
#  110|   

Error: CPPCHECK_WARNING (CWE-476): [#def75]
nfs-utils-2.8.2/utils/statd/statd.c:175: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#  173|   	if (!fp)
#  174|   		xlog_err("Opening %s failed: %m\n", pidfile);
#  175|-> 	fprintf(fp, "%d\n", getpid());
#  176|   	pidfd = dup(fileno(fp));
#  177|   	if (fclose(fp) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def76]
nfs-utils-2.8.2/utils/statd/statd.c:175:9: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(pidfile, "w")’ where non-null expected
nfs-utils-2.8.2/utils/statd/statd.c:172:14: acquire_memory: allocated here
nfs-utils-2.8.2/utils/statd/statd.c:173:12: release_memory: assuming ‘fopen(pidfile, "w")’ is NULL
nfs-utils-2.8.2/utils/statd/statd.c:173:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.2/utils/statd/statd.c:174:17: branch_true: ...to here
nfs-utils-2.8.2/utils/statd/statd.c:175:9: danger: argument 1 (‘fopen(pidfile, "w")’) NULL where non-null expected
#  173|   	if (!fp)
#  174|   		xlog_err("Opening %s failed: %m\n", pidfile);
#  175|-> 	fprintf(fp, "%d\n", getpid());
#  176|   	pidfd = dup(fileno(fp));
#  177|   	if (fclose(fp) < 0) {

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-132.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namenfs-utils-2.8.2-1.rc8.fc43
store-results-to/tmp/tmp40unqb67/nfs-utils-2.8.2-1.rc8.fc43.tar.xz
time-created2025-04-25 14:33:58
time-finished2025-04-25 14:36:13
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp40unqb67/nfs-utils-2.8.2-1.rc8.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp40unqb67/nfs-utils-2.8.2-1.rc8.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9