Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/netkit-bootparamd-0.17/version.h
Examining data/netkit-bootparamd-0.17/rpc.bootparamd/callbootd.c
Examining data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c
Examining data/netkit-bootparamd-0.17/rpc.bootparamd/main.c

FINAL RESULTS:

data/netkit-bootparamd-0.17/rpc.bootparamd/main.c:46:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt(argc, argv,"dsr:f:")) != EOF) {
data/netkit-bootparamd-0.17/rpc.bootparamd/callbootd.c:22:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char cln[MAX_MACHINE_NAME+1];
data/netkit-bootparamd-0.17/rpc.bootparamd/callbootd.c:23:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char dmn[MAX_MACHINE_NAME+1];
data/netkit-bootparamd-0.17/rpc.bootparamd/callbootd.c:24:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char path[MAX_PATH_LEN+1];
data/netkit-bootparamd-0.17/rpc.bootparamd/callbootd.c:92:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	 memcpy(&whoami_arg.client_address.bp_address_u.ip_addr, 
data/netkit-bootparamd-0.17/rpc.bootparamd/callbootd.c:172:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&sia, &res->server_address.bp_address_u.ip_addr, 4);
data/netkit-bootparamd-0.17/rpc.bootparamd/main.c:110:2:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	open("/", 0);
data/netkit-bootparamd-0.17/rpc.bootparamd/main.c:113:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	s = open("/dev/tty",2);
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:29:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char buffer[MAXLEN];
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:30:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char hostname[MAX_MACHINE_NAME];
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:31:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char askname[MAX_MACHINE_NAME];
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:32:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[MAX_PATH_LEN];
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:33:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char domain_name[MAX_MACHINE_NAME];
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:39:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[20];
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:86:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&res.router_address.bp_address_u.ip_addr, &route_addr, 
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:140:6:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    bcopy( he->h_addr, &res.server_address.bp_address_u.ip_addr, 4);
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:198:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char linebuf[8192];
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:199:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *words[16], *s;
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:264:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    bpf = fopen(bootpfile, "r");
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:292:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    bpf = fopen(bootpfile, "r");
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:76:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(askname, he->h_name, sizeof(askname));
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:127:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(askname, he->h_name, sizeof(askname));
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:133:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(hostname, buffer, where - buffer);
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:136:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(path, where, sizeof(path));
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:179:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		inc = strlen(buf+pos);
data/netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c:231:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		caplen = strlen(capname);

ANALYSIS SUMMARY:

Hits = 26
Lines analyzed = 632 in approximately 0.07 seconds (9714 lines/second)
Physical Source Lines of Code (SLOC) = 514
Hits@level = [0]  43 [1]   6 [2]  19 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  69 [1+]  26 [2+]  20 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 134.241 [1+] 50.5837 [2+] 38.9105 [3+] 1.94553 [4+]   0 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.