Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] rpcbind-1.2.7/src/rpcb_svc_4.c:411:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tail’ rpcbind-1.2.7/src/rpcb_svc_4.c:327:1: enter_function: entry to ‘rpcbproc_getaddrlist_4_local’ rpcbind-1.2.7/src/rpcb_svc_4.c:341:9: call_function: calling ‘free_rpcb_entry_list’ from ‘rpcbproc_getaddrlist_4_local’ rpcbind-1.2.7/src/rpcb_svc_4.c:341:9: return_function: returning to ‘rpcbproc_getaddrlist_4_local’ from ‘free_rpcb_entry_list’ rpcbind-1.2.7/src/rpcb_svc_4.c:346:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcb_svc_4.c:348:14: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:348:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcb_svc_4.c:354:13: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:359:30: branch_true: following ‘true’ branch (when ‘rbl’ is non-NULL)... rpcbind-1.2.7/src/rpcb_svc_4.c:360:18: branch_true: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:360:16: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcb_svc_4.c:361:18: branch_true: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:360:17: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcb_svc_4.c:362:25: branch_true: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:363:20: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcb_svc_4.c:365:49: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:365:20: branch_false: following ‘false’ branch (when the strings are equal)... rpcbind-1.2.7/src/rpcb_svc_4.c:370:21: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:374:20: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcb_svc_4.c:381:29: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:381:27: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcb_svc_4.c:391:21: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:398:20: branch_false: following ‘false’ branch (when ‘rp’ is non-NULL)... rpcbind-1.2.7/src/rpcb_svc_4.c:401:17: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:407:20: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcb_svc_4.c:411:25: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_4.c:411:25: danger: dereference of NULL ‘tail’ # 409| tail = rp; # 410| } else { # 411|-> tail->rpcb_entry_next = rp; # 412| tail = rp; # 413| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] rpcbind-1.2.7/src/rpcb_svc_com.c:964:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ rpcbind-1.2.7/src/rpcb_svc_com.c:908:1: enter_function: entry to ‘forward_register’ rpcbind-1.2.7/src/rpcb_svc_com.c:929:21: branch_true: following ‘true’ branch (when ‘i != 64’)... rpcbind-1.2.7/src/rpcb_svc_com.c:930:21: branch_true: ...to here rpcbind-1.2.7/src/rpcb_svc_com.c:944:20: branch_true: following ‘true’ branch (when ‘entry == -1’)... rpcbind-1.2.7/src/rpcb_svc_com.c:945:30: branch_true: ...to here rpcbind-1.2.7/src/rpcb_svc_com.c:959:37: call_function: calling ‘netbufdup’ from ‘forward_register’ rpcbind-1.2.7/src/rpcb_svc_com.c:959:37: return_function: returning to ‘forward_register’ from ‘netbufdup’ rpcbind-1.2.7/src/rpcb_svc_com.c:959:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcb_svc_com.c:962:9: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_com.c:964:9: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9) # 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): [#def3] rpcbind-1.2.7/src/rpcb_svc_com.c:1254:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘reply_msg.rm_xid’ rpcbind-1.2.7/src/rpcb_svc_com.c:1052:1: enter_function: entry to ‘my_svc_run’ rpcbind-1.2.7/src/rpcb_svc_com.c:1064:29: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcb_svc_com.c:1071:36: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_com.c:1071:17: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcb_svc_com.c:1080:17: branch_false: ...to here rpcbind-1.2.7/src/rpcb_svc_com.c:1088:42: call_function: calling ‘check_rmtcalls’ from ‘my_svc_run’ # 1252| free(buffer); # 1253| # 1254|-> if (reply_msg.rm_xid == 0) { # 1255| #ifdef SVC_RUN_DEBUG # 1256| if (debugging) { Error: COMPILER_WARNING (CWE-457): [#def4] rpcbind-1.2.7/src/rpcb_svc_com.c: scope_hint: In function ‘handle_reply’ rpcbind-1.2.7/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.7/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: CPPCHECK_WARNING (CWE-401): [#def5] rpcbind-1.2.7/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): [#def6] rpcbind-1.2.7/src/rpcbind.c:485:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ rpcbind-1.2.7/src/rpcbind.c:368:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:373:13: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:384:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:391:13: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:392:12: branch_false: following ‘false’ branch... branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:455:12: branch_false: following ‘false’ branch (when ‘my_xprt’ is NULL)... rpcbind-1.2.7/src/rpcbind.c:458:21: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:476:12: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcbind.c:481:17: branch_true: ...to here rpcbind-1.2.7/src/rpcbind.c:483:17: release_memory: ‘0’ is NULL rpcbind-1.2.7/src/rpcbind.c:484:20: branch_true: following ‘true’ branch (when ‘nhostsbak == 1’)... rpcbind-1.2.7/src/rpcbind.c:485:25: branch_true: ...to here rpcbind-1.2.7/src/rpcbind.c:485:25: danger: dereference of NULL ‘realloc(hosts, (long unsigned int)nhostsbak * 8)’ # 483| hosts = realloc(hosts, nhostsbak * sizeof(char *)); # 484| if (nhostsbak == 1) # 485|-> hosts[0] = "*"; # 486| else { # 487| if (hints.ai_family == AF_INET) { Error: GCC_ANALYZER_WARNING (CWE-457): [#def7] rpcbind-1.2.7/src/rpcbind.c:487:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘hints.ai_family’ rpcbind-1.2.7/src/rpcbind.c:368:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:373:13: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:384:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:391:13: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:392:12: branch_false: following ‘false’ branch... branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:455:12: branch_false: following ‘false’ branch (when ‘my_xprt’ is NULL)... rpcbind-1.2.7/src/rpcbind.c:458:21: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:476:12: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcbind.c:481:17: branch_true: ...to here rpcbind-1.2.7/src/rpcbind.c:484:20: branch_false: following ‘false’ branch (when ‘nhostsbak != 1’)... rpcbind-1.2.7/src/rpcbind.c:487:29: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:487:29: danger: use of uninitialized value ‘hints.ai_family’ here # 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): [#def8] rpcbind-1.2.7/src/rpcbind.c:510:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘hints.ai_flags’ rpcbind-1.2.7/src/rpcbind.c:368:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:373:13: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:384:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:391:13: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:392:12: branch_false: following ‘false’ branch... branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:455:12: branch_false: following ‘false’ branch (when ‘my_xprt’ is NULL)... rpcbind-1.2.7/src/rpcbind.c:458:21: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:476:12: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcbind.c:481:17: branch_true: ...to here rpcbind-1.2.7/src/rpcbind.c:484:20: branch_true: following ‘true’ branch (when ‘nhostsbak == 1’)... rpcbind-1.2.7/src/rpcbind.c:485:25: branch_true: ...to here rpcbind-1.2.7/src/rpcbind.c:499:24: branch_true: following ‘true’ branch (when ‘nhostsbak > 0’)... rpcbind-1.2.7/src/rpcbind.c:500:25: branch_true: ...to here rpcbind-1.2.7/src/rpcbind.c:504:28: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:510:25: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:510:25: danger: use of uninitialized value ‘hints.ai_flags’ here # 508| } # 509| # 510|-> hints.ai_flags &= ~AI_NUMERICHOST; # 511| switch (hints.ai_family) { # 512| case AF_INET: Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] rpcbind-1.2.7/src/rpcbind.c:680:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sa’ rpcbind-1.2.7/src/rpcbind.c:368:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:373:13: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:384:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:391:13: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:392:12: branch_false: following ‘false’ branch... branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:455:12: branch_false: following ‘false’ branch (when ‘my_xprt’ is NULL)... rpcbind-1.2.7/src/rpcbind.c:458:21: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:458:12: branch_false: following ‘false’ branch (when the strings are non-equal)... rpcbind-1.2.7/src/rpcbind.c:459:14: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:458:13: branch_false: following ‘false’ branch (when the strings are non-equal)... rpcbind-1.2.7/src/rpcbind.c:470:17: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:476:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:623:27: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:623:20: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:629:29: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:645:20: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:653:21: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:653:21: release_memory: ‘sa’ is NULL rpcbind-1.2.7/src/rpcbind.c:653:20: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:659:24: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:664:20: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcbind.c:671:17: branch_false: ...to here rpcbind-1.2.7/src/rpcbind.c:673:20: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcbind.c:679:25: branch_true: ...to here rpcbind-1.2.7/src/rpcbind.c:679:25: release_memory: ‘sa’ is NULL rpcbind-1.2.7/src/rpcbind.c:680:33: danger: dereference of NULL ‘sa’ # 678| # 679| nb.buf = sa; # 680|-> switch( sa->sa_family){ # 681| case AF_INET: # 682| sa_size2 = sizeof (struct sockaddr_in); Error: COMPILER_WARNING: [#def10] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘ip_ping_one’ rpcbind-1.2.7/src/rpcinfo.c:359:1: warning[-Wold-style-definition]: old-style function definition # 359 | ip_ping_one(client, vers) # | ^~~~~~~~~~~ # 357| #ifdef PORTMAP # 358| static enum clnt_stat # 359|-> ip_ping_one(client, vers) # 360| CLIENT *client; # 361| u_int32_t vers; Error: COMPILER_WARNING: [#def11] rpcbind-1.2.7/src/rpcinfo.c:359:1: warning[-Wold-style-definition]: old-style function definition # 357| #ifdef PORTMAP # 358| static enum clnt_stat # 359|-> ip_ping_one(client, vers) # 360| CLIENT *client; # 361| u_int32_t vers; Error: COMPILER_WARNING: [#def12] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘ip_ping’ rpcbind-1.2.7/src/rpcinfo.c:379:1: warning[-Wold-style-definition]: old-style function definition # 379 | ip_ping (portnum, proto, argc, argv) # | ^~~~~~~ # 377| */ # 378| static void # 379|-> ip_ping (portnum, proto, argc, argv) # 380| u_short portnum; # 381| char *proto; Error: COMPILER_WARNING: [#def13] rpcbind-1.2.7/src/rpcinfo.c:379:1: warning[-Wold-style-definition]: old-style function definition # 377| */ # 378| static void # 379|-> ip_ping (portnum, proto, argc, argv) # 380| u_short portnum; # 381| char *proto; Error: COMPILER_WARNING: [#def14] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘pmapdump’ rpcbind-1.2.7/src/rpcinfo.c:483:1: warning[-Wold-style-definition]: old-style function definition # 483 | pmapdump (argc, argv) # | ^~~~~~~~ # 481| */ # 482| static void # 483|-> pmapdump (argc, argv) # 484| int argc; # 485| char **argv; Error: COMPILER_WARNING: [#def15] rpcbind-1.2.7/src/rpcinfo.c:483:1: warning[-Wold-style-definition]: old-style function definition # 481| */ # 482| static void # 483|-> pmapdump (argc, argv) # 484| int argc; # 485| char **argv; Error: COMPILER_WARNING: [#def16] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘ip_getclient’ rpcbind-1.2.7/src/rpcinfo.c:584:1: warning[-Wold-style-definition]: old-style function definition # 584 | ip_getclient(hostname, prognum, versnum, proto) # | ^~~~~~~~~~~~ # 582| */ # 583| CLIENT * # 584|-> ip_getclient(hostname, prognum, versnum, proto) # 585| const char *hostname; # 586| rpcprog_t prognum; Error: COMPILER_WARNING: [#def17] rpcbind-1.2.7/src/rpcinfo.c:584:1: warning[-Wold-style-definition]: old-style function definition # 582| */ # 583| CLIENT * # 584|-> ip_getclient(hostname, prognum, versnum, proto) # 585| const char *hostname; # 586| rpcprog_t prognum; Error: COMPILER_WARNING: [#def18] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘reply_proc’ rpcbind-1.2.7/src/rpcinfo.c:677:1: warning[-Wold-style-definition]: old-style function definition # 677 | reply_proc (res, who, nconf) # | ^~~~~~~~~~ # 675| # 676| /*ARGSUSED*/ static bool_t # 677|-> reply_proc (res, who, nconf) # 678| void *res; /* Nothing comes back */ # 679| struct netbuf *who; /* Who sent us the reply */ Error: COMPILER_WARNING: [#def19] rpcbind-1.2.7/src/rpcinfo.c:677:1: warning[-Wold-style-definition]: old-style function definition # 675| # 676| /*ARGSUSED*/ static bool_t # 677|-> reply_proc (res, who, nconf) # 678| void *res; /* Nothing comes back */ # 679| struct netbuf *who; /* Who sent us the reply */ Error: COMPILER_WARNING: [#def20] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘brdcst’ rpcbind-1.2.7/src/rpcinfo.c:706:1: warning[-Wold-style-definition]: old-style function definition # 706 | brdcst (argc, argv) # | ^~~~~~ # 704| # 705| static void # 706|-> brdcst (argc, argv) # 707| int argc; # 708| char **argv; Error: COMPILER_WARNING: [#def21] rpcbind-1.2.7/src/rpcinfo.c:706:1: warning[-Wold-style-definition]: old-style function definition # 704| # 705| static void # 706|-> brdcst (argc, argv) # 707| int argc; # 708| char **argv; Error: COMPILER_WARNING: [#def22] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘add_version’ rpcbind-1.2.7/src/rpcinfo.c:734:1: warning[-Wold-style-definition]: old-style function definition # 734 | add_version (rs, vers) # | ^~~~~~~~~~~ # 732| # 733| static bool_t # 734|-> add_version (rs, vers) # 735| struct rpcbdump_short *rs; # 736| u_long vers; Error: COMPILER_WARNING: [#def23] rpcbind-1.2.7/src/rpcinfo.c:734:1: warning[-Wold-style-definition]: old-style function definition # 732| # 733| static bool_t # 734|-> add_version (rs, vers) # 735| struct rpcbdump_short *rs; # 736| u_long vers; Error: COMPILER_WARNING: [#def24] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘add_netid’ rpcbind-1.2.7/src/rpcinfo.c:755:1: warning[-Wold-style-definition]: old-style function definition # 755 | add_netid (rs, netid) # | ^~~~~~~~~ # 753| # 754| static bool_t # 755|-> add_netid (rs, netid) # 756| struct rpcbdump_short *rs; # 757| char *netid; Error: COMPILER_WARNING: [#def25] rpcbind-1.2.7/src/rpcinfo.c:755:1: warning[-Wold-style-definition]: old-style function definition # 753| # 754| static bool_t # 755|-> add_netid (rs, netid) # 756| struct rpcbdump_short *rs; # 757| char *netid; Error: COMPILER_WARNING: [#def26] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘rpcbdump’ rpcbind-1.2.7/src/rpcinfo.c:776:1: warning[-Wold-style-definition]: old-style function definition # 776 | rpcbdump (dumptype, netid, argc, argv) # | ^~~~~~~~ # 774| # 775| static void # 776|-> rpcbdump (dumptype, netid, argc, argv) # 777| int dumptype; # 778| char *netid; Error: COMPILER_WARNING: [#def27] rpcbind-1.2.7/src/rpcinfo.c:776:1: warning[-Wold-style-definition]: old-style function definition # 774| # 775| static void # 776|-> rpcbdump (dumptype, netid, argc, argv) # 777| int dumptype; # 778| char *netid; Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] rpcbind-1.2.7/src/rpcinfo.c:1016:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ rpcbind-1.2.7/src/rpcinfo.c:776:1: enter_function: entry to ‘rpcbdump’ rpcbind-1.2.7/src/rpcinfo.c:795:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)... rpcbind-1.2.7/src/rpcinfo.c:800:6: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:823:14: call_function: calling ‘local_rpcb’ from ‘rpcbdump’ rpcbind-1.2.7/src/rpcinfo.c:823:14: return_function: returning to ‘rpcbdump’ from ‘local_rpcb’ rpcbind-1.2.7/src/rpcinfo.c:825:6: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)... rpcbind-1.2.7/src/rpcinfo.c:830:3: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:835:6: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:837:11: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:837:10: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:841:11: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:842:14: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcinfo.c:855:19: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:855:18: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:858:36: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:867:22: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcinfo.c:872:24: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:872:37: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:875:43: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:876:26: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)... rpcbind-1.2.7/src/rpcinfo.c:878:27: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:878:26: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:879:25: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:903:47: acquire_memory: allocated here rpcbind-1.2.7/src/rpcinfo.c:872:37: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:875:43: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:876:26: branch_true: following ‘true’ branch (when ‘list’ is NULL)... rpcbind-1.2.7/src/rpcinfo.c:877:25: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:1016:3: danger: ‘<unknown>’ leaks here; was allocated at [(28)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/27) # 1014| } # 1015| clnt_destroy (client); # 1016|-> return; # 1017| error:fprintf (stderr, "rpcinfo: no memory\n"); # 1018| return; Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] rpcbind-1.2.7/src/rpcinfo.c:1016:3: warning[-Wanalyzer-malloc-leak]: leak of ‘prev’ rpcbind-1.2.7/src/rpcinfo.c:776:1: enter_function: entry to ‘rpcbdump’ rpcbind-1.2.7/src/rpcinfo.c:795:6: branch_false: following ‘false’ branch (when ‘argc <= 1’)... rpcbind-1.2.7/src/rpcinfo.c:800:6: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:823:14: call_function: calling ‘local_rpcb’ from ‘rpcbdump’ rpcbind-1.2.7/src/rpcinfo.c:823:14: return_function: returning to ‘rpcbdump’ from ‘local_rpcb’ rpcbind-1.2.7/src/rpcinfo.c:825:6: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)... rpcbind-1.2.7/src/rpcinfo.c:830:3: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:835:6: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:837:11: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:837:10: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:841:11: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:842:14: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcinfo.c:855:19: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:855:18: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:858:36: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:867:22: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/rpcinfo.c:872:24: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:872:37: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:875:43: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:875:43: acquire_memory: allocated here rpcbind-1.2.7/src/rpcinfo.c:876:26: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)... rpcbind-1.2.7/src/rpcinfo.c:878:27: branch_false: ...to here rpcbind-1.2.7/src/rpcinfo.c:878:26: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:879:25: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:872:37: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/rpcinfo.c:875:43: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:876:26: branch_true: following ‘true’ branch (when ‘list’ is NULL)... rpcbind-1.2.7/src/rpcinfo.c:877:25: branch_true: ...to here rpcbind-1.2.7/src/rpcinfo.c:1016:3: danger: ‘prev’ leaks here; was allocated at [(24)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/23) # 1014| } # 1015| clnt_destroy (client); # 1016|-> return; # 1017| error:fprintf (stderr, "rpcinfo: no memory\n"); # 1018| return; Error: COMPILER_WARNING: [#def30] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘rpcbaddrlist’ rpcbind-1.2.7/src/rpcinfo.c:1024:1: warning[-Wold-style-definition]: old-style function definition # 1024 | rpcbaddrlist (netid, argc, argv) # | ^~~~~~~~~~~~ # 1022| # 1023| static void # 1024|-> rpcbaddrlist (netid, argc, argv) # 1025| char *netid; # 1026| int argc; Error: COMPILER_WARNING: [#def31] rpcbind-1.2.7/src/rpcinfo.c:1024:1: warning[-Wold-style-definition]: old-style function definition # 1022| # 1023| static void # 1024|-> rpcbaddrlist (netid, argc, argv) # 1025| char *netid; # 1026| int argc; Error: COMPILER_WARNING: [#def32] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘rpcbgetstat’ rpcbind-1.2.7/src/rpcinfo.c:1146:1: warning[-Wold-style-definition]: old-style function definition # 1146 | rpcbgetstat (argc, argv) # | ^~~~~~~~~~~ # 1144| */ # 1145| static void # 1146|-> rpcbgetstat (argc, argv) # 1147| int argc; # 1148| char **argv; Error: COMPILER_WARNING: [#def33] rpcbind-1.2.7/src/rpcinfo.c:1146:1: warning[-Wold-style-definition]: old-style function definition # 1144| */ # 1145| static void # 1146|-> rpcbgetstat (argc, argv) # 1147| int argc; # 1148| char **argv; Error: COMPILER_WARNING: [#def34] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘deletereg’ rpcbind-1.2.7/src/rpcinfo.c:1382:1: warning[-Wold-style-definition]: old-style function definition # 1382 | deletereg (netid, argc, argv) # | ^~~~~~~~~ # 1380| */ # 1381| static void # 1382|-> deletereg (netid, argc, argv) # 1383| char *netid; # 1384| int argc; Error: COMPILER_WARNING: [#def35] rpcbind-1.2.7/src/rpcinfo.c:1382:1: warning[-Wold-style-definition]: old-style function definition # 1380| */ # 1381| static void # 1382|-> deletereg (netid, argc, argv) # 1383| char *netid; # 1384| int argc; Error: COMPILER_WARNING: [#def36] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘clnt_addr_create’ rpcbind-1.2.7/src/rpcinfo.c:1417:1: warning[-Wold-style-definition]: old-style function definition # 1417 | clnt_addr_create (address, nconf, prog, vers) # | ^~~~~~~~~~~~~~~~ # 1415| */ # 1416| static CLIENT * # 1417|-> clnt_addr_create (address, nconf, prog, vers) # 1418| char *address; # 1419| struct netconfig *nconf; Error: COMPILER_WARNING: [#def37] rpcbind-1.2.7/src/rpcinfo.c:1417:1: warning[-Wold-style-definition]: old-style function definition # 1415| */ # 1416| static CLIENT * # 1417|-> clnt_addr_create (address, nconf, prog, vers) # 1418| char *address; # 1419| struct netconfig *nconf; Error: COMPILER_WARNING: [#def38] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘addrping’ rpcbind-1.2.7/src/rpcinfo.c:1459:1: warning[-Wold-style-definition]: old-style function definition # 1459 | addrping (address, netid, argc, argv) # | ^~~~~~~~ # 1457| */ # 1458| static void # 1459|-> addrping (address, netid, argc, argv) # 1460| char *address; # 1461| char *netid; Error: COMPILER_WARNING: [#def39] rpcbind-1.2.7/src/rpcinfo.c:1459:1: warning[-Wold-style-definition]: old-style function definition # 1457| */ # 1458| static void # 1459|-> addrping (address, netid, argc, argv) # 1460| char *address; # 1461| char *netid; Error: COMPILER_WARNING: [#def40] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘progping’ rpcbind-1.2.7/src/rpcinfo.c:1586:1: warning[-Wold-style-definition]: old-style function definition # 1586 | progping (netid, argc, argv) # | ^~~~~~~~ # 1584| */ # 1585| static void # 1586|-> progping (netid, argc, argv) # 1587| char *netid; # 1588| int argc; Error: COMPILER_WARNING: [#def41] rpcbind-1.2.7/src/rpcinfo.c:1586:1: warning[-Wold-style-definition]: old-style function definition # 1584| */ # 1585| static void # 1586|-> progping (netid, argc, argv) # 1587| char *netid; # 1588| int argc; Error: COMPILER_WARNING: [#def42] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘getprognum’ rpcbind-1.2.7/src/rpcinfo.c:1732:1: warning[-Wold-style-definition]: old-style function definition # 1732 | getprognum (arg) # | ^~~~~~~~~~ # 1730| # 1731| static u_long # 1732|-> getprognum (arg) # 1733| char *arg; # 1734| { Error: COMPILER_WARNING: [#def43] rpcbind-1.2.7/src/rpcinfo.c:1732:1: warning[-Wold-style-definition]: old-style function definition # 1730| # 1731| static u_long # 1732|-> getprognum (arg) # 1733| char *arg; # 1734| { Error: COMPILER_WARNING: [#def44] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘getvers’ rpcbind-1.2.7/src/rpcinfo.c:1764:1: warning[-Wold-style-definition]: old-style function definition # 1764 | getvers (arg) # | ^~~~~~~ # 1762| # 1763| static u_long # 1764|-> getvers (arg) # 1765| char *arg; # 1766| { Error: COMPILER_WARNING: [#def45] rpcbind-1.2.7/src/rpcinfo.c:1764:1: warning[-Wold-style-definition]: old-style function definition # 1762| # 1763| static u_long # 1764|-> getvers (arg) # 1765| char *arg; # 1766| { Error: COMPILER_WARNING: [#def46] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘pstatus’ rpcbind-1.2.7/src/rpcinfo.c:1787:1: warning[-Wold-style-definition]: old-style function definition # 1787 | pstatus (client, prog, vers) # | ^~~~~~~ # 1785| */ # 1786| static int # 1787|-> pstatus (client, prog, vers) # 1788| register CLIENT *client; # 1789| u_long prog; Error: COMPILER_WARNING: [#def47] rpcbind-1.2.7/src/rpcinfo.c:1787:1: warning[-Wold-style-definition]: old-style function definition # 1785| */ # 1786| static int # 1787|-> pstatus (client, prog, vers) # 1788| register CLIENT *client; # 1789| u_long prog; Error: COMPILER_WARNING: [#def48] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘clnt_rpcbind_create’ rpcbind-1.2.7/src/rpcinfo.c:1809:1: warning[-Wold-style-definition]: old-style function definition # 1809 | clnt_rpcbind_create (host, rpcbversnum, targaddr) # | ^~~~~~~~~~~~~~~~~~~ # 1807| # 1808| static CLIENT * # 1809|-> clnt_rpcbind_create (host, rpcbversnum, targaddr) # 1810| char *host; # 1811| int rpcbversnum; Error: COMPILER_WARNING: [#def49] rpcbind-1.2.7/src/rpcinfo.c:1809:1: warning[-Wold-style-definition]: old-style function definition # 1807| # 1808| static CLIENT * # 1809|-> clnt_rpcbind_create (host, rpcbversnum, targaddr) # 1810| char *host; # 1811| int rpcbversnum; Error: COMPILER_WARNING: [#def50] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘getclnthandle’ rpcbind-1.2.7/src/rpcinfo.c:1845:1: warning[-Wold-style-definition]: old-style function definition # 1845 | getclnthandle (host, nconf, rpcbversnum, targaddr) # | ^~~~~~~~~~~~~ # 1843| # 1844| static CLIENT * # 1845|-> getclnthandle (host, nconf, rpcbversnum, targaddr) # 1846| char *host; # 1847| struct netconfig *nconf; Error: COMPILER_WARNING: [#def51] rpcbind-1.2.7/src/rpcinfo.c:1845:1: warning[-Wold-style-definition]: old-style function definition # 1843| # 1844| static CLIENT * # 1845|-> getclnthandle (host, nconf, rpcbversnum, targaddr) # 1846| char *host; # 1847| struct netconfig *nconf; Error: COMPILER_WARNING: [#def52] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘print_rmtcallstat’ rpcbind-1.2.7/src/rpcinfo.c:1901:1: warning[-Wold-style-definition]: old-style function definition # 1901 | print_rmtcallstat (rtype, infp) # | ^~~~~~~~~~~~~~~~~ # 1899| # 1900| static void # 1901|-> print_rmtcallstat (rtype, infp) # 1902| int rtype; # 1903| rpcb_stat *infp; Error: COMPILER_WARNING: [#def53] rpcbind-1.2.7/src/rpcinfo.c:1901:1: warning[-Wold-style-definition]: old-style function definition # 1899| # 1900| static void # 1901|-> print_rmtcallstat (rtype, infp) # 1902| int rtype; # 1903| rpcb_stat *infp; Error: COMPILER_WARNING: [#def54] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘print_getaddrstat’ rpcbind-1.2.7/src/rpcinfo.c:1927:1: warning[-Wold-style-definition]: old-style function definition # 1927 | print_getaddrstat (rtype, infp) # | ^~~~~~~~~~~~~~~~~ # 1925| # 1926| static void # 1927|-> print_getaddrstat (rtype, infp) # 1928| int rtype; # 1929| rpcb_stat *infp; Error: COMPILER_WARNING: [#def55] rpcbind-1.2.7/src/rpcinfo.c:1927:1: warning[-Wold-style-definition]: old-style function definition # 1925| # 1926| static void # 1927|-> print_getaddrstat (rtype, infp) # 1928| int rtype; # 1929| rpcb_stat *infp; Error: COMPILER_WARNING: [#def56] rpcbind-1.2.7/src/rpcinfo.c: scope_hint: In function ‘spaces’ rpcbind-1.2.7/src/rpcinfo.c:1948:1: warning[-Wold-style-definition]: old-style function definition # 1948 | spaces (howmany) # | ^~~~~~ # 1946| # 1947| static char * # 1948|-> spaces (howmany) # 1949| int howmany; # 1950| { Error: COMPILER_WARNING: [#def57] rpcbind-1.2.7/src/rpcinfo.c:1948:1: warning[-Wold-style-definition]: old-style function definition # 1946| # 1947| static char * # 1948|-> spaces (howmany) # 1949| int howmany; # 1950| { Error: CPPCHECK_WARNING (CWE-476): [#def58] rpcbind-1.2.7/src/util.c:326: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: 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: GCC_ANALYZER_WARNING (CWE-476): [#def59] rpcbind-1.2.7/src/util.c:326:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘local_in4’ rpcbind-1.2.7/src/util.c:316:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/util.c:321:51: branch_false: ...to here rpcbind-1.2.7/src/util.c:321:51: acquire_memory: allocated here rpcbind-1.2.7/src/util.c:322:20: release_memory: assuming ‘local_in4’ is NULL rpcbind-1.2.7/src/util.c:322:20: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/util.c:323:29: branch_true: ...to here rpcbind-1.2.7/src/util.c:326:17: danger: 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: CPPCHECK_WARNING (CWE-476): [#def60] rpcbind-1.2.7/src/util.c:341: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: local_in6 # 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): [#def61] rpcbind-1.2.7/src/util.c:341:17: warning[-Wanalyzer-null-argument]: use of NULL ‘local_in6’ where non-null expected rpcbind-1.2.7/src/util.c:331:12: branch_false: following ‘false’ branch... rpcbind-1.2.7/src/util.c:336:52: branch_false: ...to here rpcbind-1.2.7/src/util.c:336:52: acquire_memory: allocated here rpcbind-1.2.7/src/util.c:337:20: release_memory: assuming ‘local_in6’ is NULL rpcbind-1.2.7/src/util.c:337:20: branch_true: following ‘true’ branch... rpcbind-1.2.7/src/util.c:338:29: branch_true: ...to here rpcbind-1.2.7/src/util.c:341:17: danger: argument 1 (‘local_in6’) NULL where non-null expected #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|
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
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-215.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | rpcbind-1.2.7-1.rc1.fc43.4 |
store-results-to | /tmp/tmpywt1zfqv/rpcbind-1.2.7-1.rc1.fc43.4.tar.xz |
time-created | 2025-04-25 15:36:47 |
time-finished | 2025-04-25 15:38:01 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpywt1zfqv/rpcbind-1.2.7-1.rc1.fc43.4.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpywt1zfqv/rpcbind-1.2.7-1.rc1.fc43.4.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |