Task #1232 - rpcbind-1.2.6-4.rc3.fc41/scan-results.err
back to task #1232download
Error: CPPCHECK_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/check_bound.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/pmap_svc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_stat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_4.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_4.c:411:26: warning[core.NullDereference]: Access to field 'rpcb_entry_next' results in a dereference of a null pointer (loaded from variable 'tail') # 409| tail = rp; # 410| } else { # 411|-> tail->rpcb_entry_next = rp; # 412| tail = rp; # 413| } Error: GCC_ANALYZER_WARNING (CWE-476): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_4.c: scope_hint: In function ‘rpcbproc_getaddrlist_4_local’ rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_4.c:411:47: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tail’ # 409| tail = rp; # 410| } else { # 411|-> tail->rpcb_entry_next = rp; # 412| tail = rp; # 413| } Error: CPPCHECK_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c: scope_hint: In function ‘forward_register’ rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c:964:29: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 962| rpcb_rmtcalls++; /* no of pending calls */ # 963| FINFO[j].flag = FINFO_ACTIVE; # 964|-> FINFO[j].reply_type = reply_type; # 965| FINFO[j].versnum = versnum; # 966| FINFO[j].time = time_now; Error: GCC_ANALYZER_WARNING (CWE-457): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c: scope_hint: In function ‘handle_reply’ rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c:1254:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘reply_msg.rm_xid’ rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c: scope_hint: In function ‘handle_reply’ # 1252| free(buffer); # 1253| # 1254|-> if (reply_msg.rm_xid == 0) { # 1255| #ifdef SVC_RUN_DEBUG # 1256| if (debugging) { Error: COMPILER_WARNING (CWE-457): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c: scope_hint: In function ‘handle_reply’ rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c:1254:22: warning[-Wmaybe-uninitialized]: ‘reply_msg.rm_xid’ may be used uninitialized # 1254 | if (reply_msg.rm_xid == 0) { # | ~~~~~~~~~^~~~~~~ rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c:1177:25: note: ‘reply_msg’ declared here # 1177 | struct rpc_msg reply_msg; # | ^~~~~~~~~ # 1252| free(buffer); # 1253| # 1254|-> if (reply_msg.rm_xid == 0) { # 1255| #ifdef SVC_RUN_DEBUG # 1256| if (debugging) { Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcb_svc_com.c:1254:23: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 1252| free(buffer); # 1253| # 1254|-> if (reply_msg.rm_xid == 0) { # 1255| #ifdef SVC_RUN_DEBUG # 1256| if (debugging) { Error: CPPCHECK_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:164:4: warning[deadcode.DeadStores]: Value stored to 'once' is never read # 162| O_RDONLY|O_CREAT, 0444))) == -1) { # 163| if (once) { # 164|-> once = system(systemdtmp); /* set once to avoid a warning */ # 165| once = 0; # 166| goto tryagain; Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:427:23: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 425| } # 426| # 427|-> if (sa.sa.sa_family == AF_INET6 && handle_ipv6_socket(fd)) # 428| goto error; # 429| Error: CPPCHECK_WARNING (CWE-401): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:483: error[memleakOnRealloc]: Common realloc mistake: 'hosts' nulled but not freed upon failure # 481| nhostsbak = nhosts; # 482| nhostsbak++; # 483|-> hosts = realloc(hosts, nhostsbak * sizeof(char *)); # 484| if (nhostsbak == 1) # 485| hosts[0] = "*"; Error: GCC_ANALYZER_WARNING (CWE-476): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c: scope_hint: In function ‘init_transport’ rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:485:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 483| hosts = realloc(hosts, nhostsbak * sizeof(char *)); # 484| if (nhostsbak == 1) # 485|-> hosts[0] = "*"; # 486| else { # 487| if (hints.ai_family == AF_INET) { Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:487:24: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 485| hosts[0] = "*"; # 486| else { # 487|-> if (hints.ai_family == AF_INET) { # 488| hosts[nhostsbak - 1] = "127.0.0.1"; # 489| } else if (hints.ai_family == AF_INET6) { Error: GCC_ANALYZER_WARNING (CWE-457): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:487:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘hints.ai_family’ # 485| hosts[0] = "*"; # 486| else { # 487|-> if (hints.ai_family == AF_INET) { # 488| hosts[nhostsbak - 1] = "127.0.0.1"; # 489| } else if (hints.ai_family == AF_INET6) { Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:510:19: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage # 508| } # 509| # 510|-> hints.ai_flags &= ~AI_NUMERICHOST; # 511| switch (hints.ai_family) { # 512| case AF_INET: Error: GCC_ANALYZER_WARNING (CWE-457): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:510:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘hints.ai_flags’ # 508| } # 509| # 510|-> hints.ai_flags &= ~AI_NUMERICHOST; # 511| switch (hints.ai_family) { # 512| case AF_INET: Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:548:9: warning[deadcode.DeadStores]: Although the value stored to 'aicode' is used in the enclosing expression, the value is never actually read from 'aicode' # 546| hosts[nhostsbak] = NULL; # 547| # 548|-> if ((aicode = getaddrinfo(hosts[nhostsbak], # 549| servname, &hints, &res)) != 0) { # 550| if ((aicode = getaddrinfo(hosts[nhostsbak], Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:631:9: warning[deadcode.DeadStores]: Although the value stored to 'aicode' is used in the enclosing expression, the value is never actually read from 'aicode' # 629| if ((strcmp(nconf->nc_netid, "local") != 0) && # 630| (strcmp(nconf->nc_netid, "unix") != 0)) { # 631|-> if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) { # 632| if ((aicode = getaddrinfo(NULL, "portmapper", &hints, &res))!= 0) { # 633| printf("cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:671:3: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 669| return 1; # 670| } # 671|-> memcpy(taddr.addr.buf, sa, addrlen); # 672| #ifdef RPCBIND_DEBUG # 673| if (debugging) { Error: GCC_ANALYZER_WARNING (CWE-688): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcbind.c:671:17: warning[-Wanalyzer-null-argument]: use of NULL ‘sa’ where non-null expected <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 669| return 1; # 670| } # 671|-> memcpy(taddr.addr.buf, sa, addrlen); # 672| #ifdef RPCBIND_DEBUG # 673| if (debugging) { Error: CPPCHECK_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:469:7: warning[deadcode.DeadStores]: Value stored to 'rpc_stat' is never read # 467| for (vers = minvers; vers <= maxvers; vers++) # 468| { # 469|-> rpc_stat = ip_ping_one(client, vers); # 470| if (pstatus (client, prognum, vers) < 0) # 471| failure = 1; Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:975:26: warning[unix.Malloc]: Potential leak of memory pointed to by 'rs' # 973| printf # 974| (" program version(s) netid(s) service owner\n"); # 975|-> for (rs = rs_head; rs; rs = rs->next) # 976| { # 977| size_t netidmax = sizeof(buf) - 1; Error: GCC_ANALYZER_WARNING (CWE-401): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:1016:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:841:11: note: in expansion of macro ‘CLNT_GETERR’ # 1014| } # 1015| clnt_destroy (client); # 1016|-> return; # 1017| error:fprintf (stderr, "rpcinfo: no memory\n"); # 1018| return; Error: GCC_ANALYZER_WARNING (CWE-401): rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c: scope_hint: In function ‘rpcbdump’ rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:1016:3: warning[-Wanalyzer-malloc-leak]: leak of ‘prev’ /usr/include/tirpc/rpc/rpc.h:49: included_from: Included from here. rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:52: included_from: Included from here. rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:841:11: note: in expansion of macro ‘CLNT_GETERR’ # 1014| } # 1015| clnt_destroy (client); # 1016|-> return; # 1017| error:fprintf (stderr, "rpcinfo: no memory\n"); # 1018| return; Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:1017:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'head' # 1015| clnt_destroy (client); # 1016| return; # 1017|-> error:fprintf (stderr, "rpcinfo: no memory\n"); # 1018| return; # 1019| } Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:1017:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'prev' # 1015| clnt_destroy (client); # 1016| return; # 1017|-> error:fprintf (stderr, "rpcinfo: no memory\n"); # 1018| return; # 1019| } Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:1566:7: warning[deadcode.DeadStores]: Value stored to 'rpc_stat' is never read # 1564| { # 1565| client = clnt_addr_create (address, nconf, prognum, versnum); # 1566|-> rpc_stat = CLNT_CALL (client, NULLPROC, (xdrproc_t) xdr_void, # 1567| (char *) NULL, (xdrproc_t) xdr_void, # 1568| (char *) NULL, to); Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/rpcinfo.c:1700:7: warning[deadcode.DeadStores]: Value stored to 'rpc_stat' is never read # 1698| { # 1699| (void) CLNT_CONTROL (client, CLSET_VERS, (char *) &versnum); # 1700|-> rpc_stat = CLNT_CALL (client, NULLPROC, (xdrproc_t) xdr_void, # 1701| (char *) NULL, (xdrproc_t) xdr_void, # 1702| (char *) NULL, to); Error: CPPCHECK_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/util.c:326:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 324| fprintf(stderr, "can't alloc local ip4 addr\n"); # 325| } # 326|-> memcpy(local_in4, res->ai_addr, sizeof *local_in4); # 327| } # 328| Error: GCC_ANALYZER_WARNING (CWE-476): rpcbind-1.2.6-build/rpcbind-1.2.6/src/util.c: scope_hint: In function ‘network_init’ rpcbind-1.2.6-build/rpcbind-1.2.6/src/util.c:326:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘local_in4’ # 324| fprintf(stderr, "can't alloc local ip4 addr\n"); # 325| } # 326|-> memcpy(local_in4, res->ai_addr, sizeof *local_in4); # 327| } # 328| Error: CLANG_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/util.c:341:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 339| fprintf(stderr, "can't alloc local ip6 addr\n"); # 340| } # 341|-> memcpy(local_in6, res->ai_addr, sizeof *local_in6); # 342| } # 343| Error: GCC_ANALYZER_WARNING (CWE-688): rpcbind-1.2.6-build/rpcbind-1.2.6/src/util.c:341:17: warning[-Wanalyzer-null-argument]: use of NULL ‘local_in6’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 339| fprintf(stderr, "can't alloc local ip6 addr\n"); # 340| } # 341|-> memcpy(local_in6, res->ai_addr, sizeof *local_in6); # 342| } # 343| Error: CPPCHECK_WARNING: rpcbind-1.2.6-build/rpcbind-1.2.6/src/xlog.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.