Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] libtirpc-1.3.6-build/libtirpc-1.3.6/src/auth_time.c: scope_hint: In function 'get_server' libtirpc-1.3.6-build/libtirpc-1.3.6/src/auth_time.c:176:50: warning[-Wanalyzer-malloc-leak]: leak of 'strdup("tcp")' # 174| */ # 175| for (i = 0; (he->h_addr_list[i] != NULL) && (num_ep < maxep); # 176|-> i++, num_ep++) { # 177| struct in_addr *a; # 178| Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] libtirpc-1.3.6-build/libtirpc-1.3.6/src/auth_time.c:182:38: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(&hname)' # 180| snprintf(hname, sizeof(hname), "%s.0.111", inet_ntoa(*a)); # 181| eps[num_ep].uaddr = strdup(hname); # 182|-> eps[num_ep].family = strdup("inet"); # 183| eps[num_ep].proto = strdup("tcp"); # 184| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] libtirpc-1.3.6-build/libtirpc-1.3.6/src/auth_time.c:183:38: warning[-Wanalyzer-malloc-leak]: leak of 'strdup("inet")' # 181| eps[num_ep].uaddr = strdup(hname); # 182| eps[num_ep].family = strdup("inet"); # 183|-> eps[num_ep].proto = strdup("tcp"); # 184| } # 185| Error: GCC_ANALYZER_WARNING (CWE-688): [#def4] libtirpc-1.3.6-build/libtirpc-1.3.6/src/auth_time.c: scope_hint: In function '__rpc_get_time_offset' libtirpc-1.3.6-build/libtirpc-1.3.6/src/auth_time.c:284:29: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL '*<unknown>.proto' where non-null expected /usr/include/string.h:462: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/auth_time.c:33: included_from: Included from here. /usr/include/strings.h:116:12: note: argument 1 of 'strcasecmp' must be non-null # 282| for (i = 0; # 283| (i < epl) && ((udp_ep == -1) || (tcp_ep == -1)); i++) { # 284|-> if (strcasecmp(ep[i].proto, "udp") == 0) # 285| udp_ep = i; # 286| if (strcasecmp(ep[i].proto, "tcp") == 0) Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] libtirpc-1.3.6-build/libtirpc-1.3.6/src/clnt_simple.c: scope_hint: In function 'rpc_call' libtirpc-1.3.6-build/libtirpc-1.3.6/src/clnt_simple.c:118:46: warning[-Wanalyzer-malloc-leak]: leak of 'rcp' libtirpc-1.3.6-build/libtirpc-1.3.6/src/clnt_simple.c:38: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/clnt_simple.c:120:17: note: in expansion of macro 'thr_setspecific' # 116| rpc_createerr.cf_stat = RPC_SYSTEMERROR; # 117| rpc_createerr.cf_error.re_errno = errno; # 118|-> return (rpc_createerr.cf_stat); # 119| } # 120| thr_setspecific(rpc_call_key, (void *) rcp); Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c: scope_hint: In function 'endnetconfig' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:139:20: warning[-Wanalyzer-malloc-leak]: leak of '__nc_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:369:9: note: in expansion of macro 'nc_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:34: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:151:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:369:9: note: in expansion of macro 'nc_error' # 137| * fails. # 138| */ # 139|-> if (nc_key == KEY_INITIALIZER) { # 140| error = 0; # 141| mutex_lock(&nc_lock); Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c: scope_hint: In function 'setnetconfig' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:207:5: warning[-Wanalyzer-malloc-leak]: leak of '__nc_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:195:5: note: in expansion of macro 'mutex_lock' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:206:5: note: in expansion of macro 'nc_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:151:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:206:5: note: in expansion of macro 'nc_error' # 205| mutex_unlock(&nc_db_lock); # 206| nc_error = NC_NONETCONFIG; # 207|-> free(nc_vars); # 208| return (NULL); # 209| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c: scope_hint: In function 'getnetconfigent' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:430:8: warning[-Wanalyzer-malloc-leak]: leak of '__nc_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:429:5: note: in expansion of macro 'nc_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:151:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:429:5: note: in expansion of macro 'nc_error' # 428| # 429| nc_error = NC_NOTFOUND; /* default error. */ # 430|-> if (netid == NULL || strlen(netid) == 0) { # 431| return (NULL); # 432| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c: scope_hint: In function 'parse_ncp' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:550:13: warning[-Wanalyzer-malloc-leak]: leak of '__nc_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:549:5: note: in expansion of macro 'nc_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:151:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:549:5: note: in expansion of macro 'nc_error' # 548| # 549| nc_error = NC_BADFILE; /* nearly anything that breaks is for this reason */ # 550|-> stringp[strlen(stringp)-1] = '\0'; /* get rid of newline */ # 551| /* netid */ # 552| if ((ncp->nc_netid = strtok_r(stringp, "\t ", &lasts)) == NULL) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def10] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:618:57: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*ncp.nc_lookups + *ncp.nc_nlookups * 8' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:549:5: note: in expansion of macro 'nc_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:151:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:549:5: note: in expansion of macro 'nc_error' # 616| while ((cp = tokenp) != NULL) { # 617| tokenp = _get_next_token(cp, ','); # 618|-> ncp->nc_lookups[(size_t)ncp->nc_nlookups++] = cp; # 619| ncp->nc_lookups = (char **)realloc(ncp->nc_lookups, # 620| (size_t)(ncp->nc_nlookups+1) *sizeof(char *)); /* for next loop */ Error: GCC_ANALYZER_WARNING (CWE-476): [#def11] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:618:57: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*ncp.nc_lookups' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:549:5: note: in expansion of macro 'nc_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:151:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:549:5: note: in expansion of macro 'nc_error' # 616| while ((cp = tokenp) != NULL) { # 617| tokenp = _get_next_token(cp, ','); # 618|-> ncp->nc_lookups[(size_t)ncp->nc_nlookups++] = cp; # 619| ncp->nc_lookups = (char **)realloc(ncp->nc_lookups, # 620| (size_t)(ncp->nc_nlookups+1) *sizeof(char *)); /* for next loop */ Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:619:29: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 617| tokenp = _get_next_token(cp, ','); # 618| ncp->nc_lookups[(size_t)ncp->nc_nlookups++] = cp; # 619|-> ncp->nc_lookups = (char **)realloc(ncp->nc_lookups, # 620| (size_t)(ncp->nc_nlookups+1) *sizeof(char *)); /* for next loop */ # 621| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c: scope_hint: In function 'nc_sperror' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:635:5: warning[-Wanalyzer-malloc-leak]: leak of '__nc_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:635:12: note: in expansion of macro 'nc_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:151:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:635:12: note: in expansion of macro 'nc_error' # 633| const char *message; # 634| # 635|-> switch(nc_error) { # 636| case NC_NONETCONFIG: # 637| message = _nc_errors[0]; Error: GCC_ANALYZER_WARNING (CWE-476): [#def14] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetpath.c: scope_hint: In function 'getnetpath' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetpath.c:168:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'chainp' # 166| chainp = (struct netpath_chain *) /* cobble alloc chain entry */ # 167| malloc(sizeof (struct netpath_chain)); # 168|-> chainp->ncp = ncp; # 169| chainp->nchain_next = NULL; # 170| if (np_sessionp->ncp_list == NULL) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetpath.c:173:52: warning[-Wanalyzer-malloc-leak]: leak of 'chainp' # 171| np_sessionp->ncp_list = chainp; # 172| } else { # 173|-> np_sessionp->ncp_list->nchain_next = chainp; # 174| } # 175| return (ncp); Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] libtirpc-1.3.6-build/libtirpc-1.3.6/src/key_call.c: scope_hint: In function 'getkeyserv_handle' libtirpc-1.3.6-build/libtirpc-1.3.6/src/key_call.c:315:33: warning[-Wanalyzer-malloc-leak]: leak of 'kcp' libtirpc-1.3.6-build/libtirpc-1.3.6/src/key_call.c:44: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/key_call.c:317:17: note: in expansion of macro 'thr_setspecific' # 313| kcp = (struct key_call_private *)malloc(sizeof (*kcp)); # 314| if (kcp == (struct key_call_private *)NULL) { # 315|-> return ((CLIENT *) NULL); # 316| } # 317| thr_setspecific(key_call_key, (void *) kcp); Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_generic.c:273:17: warning[-Wanalyzer-malloc-leak]: leak of 'netid_tcp' # 271| if (strcmp(nettype, "udp") == 0) # 272| netid = netid_udp; # 273|-> else if (strcmp(nettype, "tcp") == 0) # 274| netid = netid_tcp; # 275| else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_generic.c: scope_hint: In function '__rpc_getconfip' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_generic.c:273:17: warning[-Wanalyzer-malloc-leak]: leak of 'netid_udp' # 271| if (strcmp(nettype, "udp") == 0) # 272| netid = netid_udp; # 273|-> else if (strcmp(nettype, "tcp") == 0) # 274| netid = netid_tcp; # 275| else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_generic.c:278:12: warning[-Wanalyzer-malloc-leak]: leak of 'netid_tcp' # 276| return (NULL); # 277| } # 278|-> if ((netid == NULL) || (netid[0] == 0)) { # 279| return (NULL); # 280| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_oid_to_mech' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:54:20: warning[-Wanalyzer-malloc-leak]: leak of '__rpc_gss_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_oid_to_mech' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:31: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:73:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_oid_to_mech' # 52| rpc_gss_error_t *result; # 53| # 54|-> if (rg_key == KEY_INITIALIZER) { # 55| static mutex_t _rpc_gss_error_lock = MUTEX_INITIALIZER; # 56| int err = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_set_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:109:1: warning[-Wanalyzer-malloc-leak]: leak of '__rpc_gss_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:31: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:73:21: note: in expansion of macro 'thr_setspecific' # 107| error->rpc_gss_error = RPC_GSS_ER_SYSTEMERROR; # 108| error->system_error = system_error; # 109|-> } # 110| # 111| /* Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_clear_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:121:1: warning[-Wanalyzer-malloc-leak]: leak of '__rpc_gss_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:73:21: note: in expansion of macro 'thr_setspecific' # 119| error->rpc_gss_error = RPC_GSS_ER_SUCCESS; # 120| error->system_error = 0; # 121|-> } # 122| # 123| /* Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_get_mechanisms' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:251:16: warning[-Wanalyzer-malloc-leak]: leak of '__rpc_gss_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_get_mechanisms' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:73:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_get_mechanisms' # 249| { # 250| rpc_gss_clear_error(); # 251|-> return (char **)_rpc_gss_mechanism_names; # 252| } # 253| Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_get_mech_info' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:281:16: warning[-Wanalyzer-malloc-leak]: leak of '__rpc_gss_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_get_mech_info' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:73:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_get_mech_info' # 279| # 280| rpc_gss_clear_error(); # 281|-> *dummy = rpcsec_gss_svc_privacy; # 282| return (char **)m->mi_qop_names; # 283| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_get_versions' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:302:22: warning[-Wanalyzer-malloc-leak]: leak of '__rpc_gss_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_get_versions' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:73:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_get_versions' # 300| # 301| rpc_gss_clear_error(); # 302|-> *high = *low = RPCSEC_GSS_VERSION; # 303| return TRUE; # 304| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_is_installed' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:325:13: warning[-Wanalyzer-malloc-leak]: leak of '__rpc_gss_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_is_installed' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c:73:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_gss_utils.c: scope_hint: In function 'rpc_gss_is_installed' # 323| # 324| rpc_gss_clear_error(); # 325|-> m = _rpc_gss_find_mechanism(mechanism); # 326| if (m == NULL) # 327| return FALSE; Error: GCC_ANALYZER_WARNING (CWE-775): [#def27] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_soc.c: scope_hint: In function 'svcunix_create' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpc_soc.c:704:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor '__rpc_nconf2fd(<unknown>)' # 702| sun.sun_family = AF_LOCAL; # 703| strncpy(sun.sun_path, path, (sizeof(sun.sun_path)-1)); # 704|-> if (sun.sun_path[0] == '@') # 705| /* abstract address */ # 706| sun.sun_path[0] = '\0'; Error: GCC_ANALYZER_WARNING (CWE-476): [#def28] libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpcb_clnt.c: scope_hint: In function 'delete_cache' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpcb_clnt.c:264:65: warning[-Wanalyzer-null-dereference]: dereference of NULL 'addr' libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpcb_clnt.c:57: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/rpcb_clnt.c:244:25: note: in expansion of macro 'LIBTIRPC_DEBUG' # 262| # 263| for (cptr = front; cptr != NULL; cptr = cptr->ac_next) { # 264|-> if (!memcmp(cptr->ac_taddr->buf, addr->buf, addr->len)) { # 265| /* Unlink from cache. We'll destroy it after releasing the mutex. */ # 266| if (cptr->ac_uaddr) { Error: GCC_ANALYZER_WARNING (CWE-688): [#def29] libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c: scope_hint: In function 'cache_set' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:582:16: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'calloc(1, (long unsigned int)*xprt.xp_rtaddr.len)' where non-null expected libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:388:18: note: in expansion of macro 'mem_alloc' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:542:26: note: in expansion of macro 'ALLOC' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:548:26: note: in expansion of macro 'mem_alloc' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:388:18: note: in expansion of macro 'mem_alloc' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:581:34: note: in expansion of macro 'ALLOC' <built-in>: note: argument 1 of '__builtin_memcpy' must be non-null # 580| victim->cache_addr = xprt->xp_rtaddr; # 581| victim->cache_addr.buf = ALLOC(char, xprt->xp_rtaddr.len); # 582|-> (void) memcpy(victim->cache_addr.buf, xprt->xp_rtaddr.buf, # 583| (size_t)xprt->xp_rtaddr.len); # 584| loc = CACHE_LOC(xprt, victim->cache_xid); Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] libtirpc-1.3.6-build/libtirpc-1.3.6/src/xdr_rec.c: scope_hint: In function 'realloc_stream' libtirpc-1.3.6-build/libtirpc-1.3.6/src/xdr_rec.c:788:32: warning[-Wanalyzer-malloc-leak]: leak of 'buf' libtirpc-1.3.6-build/libtirpc-1.3.6/src/xdr_rec.c:50: included_from: Included from here. # 786| rstrm->in_boundry = buf + size; # 787| rstrm->recvsize = size; # 788|-> rstrm->in_size = size; # 789| } # 790| Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:44: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c: scope_hint: In function 'svc_dg_enablecache' libtirpc-1.3.6-build/libtirpc-1.3.6/tirpc/reentrant.h:57:33: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:491:9: note: in expansion of macro 'mutex_unlock' libtirpc-1.3.6-build/libtirpc-1.3.6/tirpc/rpc/rpc.h:38: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:47: included_from: Included from here. libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:388:18: note: in expansion of macro 'mem_alloc' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:465:14: note: in expansion of macro 'ALLOC' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:388:18: note: in expansion of macro 'mem_alloc' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:473:26: note: in expansion of macro 'ALLOC' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:480:9: note: in expansion of macro 'MEMZERO' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:489:9: note: in expansion of macro 'MEMZERO' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:491:9: note: in expansion of macro 'mutex_unlock' # 55| #define mutex_init(m, a) pthread_mutex_init(m, a) # 56| #define mutex_lock(m) pthread_mutex_lock(m) # 57|-> #define mutex_unlock(m) pthread_mutex_unlock(m) # 58| # 59| #define cond_init(c, a, p) pthread_cond_init(c, a) Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c: scope_hint: In function 'getnetconfig' libtirpc-1.3.6-build/libtirpc-1.3.6/tirpc/reentrant.h:57:33: warning[-Wanalyzer-malloc-leak]: leak of '__nc_error()' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:236:9: note: in expansion of macro 'mutex_unlock' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:235:9: note: in expansion of macro 'nc_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:151:21: note: in expansion of macro 'thr_setspecific' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:235:9: note: in expansion of macro 'nc_error' libtirpc-1.3.6-build/libtirpc-1.3.6/src/getnetconfig.c:236:9: note: in expansion of macro 'mutex_unlock' # 55| #define mutex_init(m, a) pthread_mutex_init(m, a) # 56| #define mutex_lock(m) pthread_mutex_lock(m) # 57|-> #define mutex_unlock(m) pthread_mutex_unlock(m) # 58| # 59| #define cond_init(c, a, p) pthread_cond_init(c, a) Error: GCC_ANALYZER_WARNING (CWE-401): [#def33] libtirpc-1.3.6-build/libtirpc-1.3.6/tirpc/reentrant.h:57:33: warning[-Wanalyzer-malloc-leak]: leak of 'uc' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:491:9: note: in expansion of macro 'mutex_unlock' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:388:18: note: in expansion of macro 'mem_alloc' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:465:14: note: in expansion of macro 'ALLOC' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:388:18: note: in expansion of macro 'mem_alloc' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:465:14: note: in expansion of macro 'ALLOC' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:480:9: note: in expansion of macro 'MEMZERO' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:489:9: note: in expansion of macro 'MEMZERO' libtirpc-1.3.6-build/libtirpc-1.3.6/src/svc_dg.c:491:9: note: in expansion of macro 'mutex_unlock' # 55| #define mutex_init(m, a) pthread_mutex_init(m, a) # 56| #define mutex_lock(m) pthread_mutex_lock(m) # 57|-> #define mutex_unlock(m) pthread_mutex_unlock(m) # 58| # 59| #define cond_init(c, a, p) pthread_cond_init(c, a)
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-76.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libtirpc-1.3.6-0.rc1.fc42 |
store-results-to | /tmp/tmpjllxe9_0/libtirpc-1.3.6-0.rc1.fc42.tar.xz |
time-created | 2024-11-13 01:45:20 |
time-finished | 2024-11-13 01:47:08 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpjllxe9_0/libtirpc-1.3.6-0.rc1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpjllxe9_0/libtirpc-1.3.6-0.rc1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |