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/libnet-patricia-perl-1.22/libpatricia/patricia.c
Examining data/libnet-patricia-perl-1.22/libpatricia/patricia.h
Examining data/libnet-patricia-perl-1.22/demo/demo.c

FINAL RESULTS:

data/libnet-patricia-perl-1.22/libpatricia/patricia.c:91: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 (dst, xp, sizeof(struct in_addr));
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:120:13:  [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 buffs[PATRICIA_MAX_THREADS][48+5];
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:144:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf (buff, "%d.%d.%d.%d/%d", a[0], a[1], a[2], a[3],
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:148:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf (buff, "%d.%d.%d.%d", a[0], a[1], a[2], a[3]);
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:158:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf (buff + strlen (buff), "/%d", prefix->bitlen);
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:197: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 (&prefix->add.sin6, dest, sizeof(struct in6_addr));
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:213: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 (&prefix->add.sin, dest, sizeof(struct in_addr));
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:247:5:  [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 save[MAXLINE];
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:270:11:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	bitlen = atol (cp + 1);
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:274: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 (save, string, cp - string);
data/libnet-patricia-perl-1.22/libpatricia/patricia.c:158:22:  [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).
	    sprintf (buff + strlen (buff), "/%d", prefix->bitlen);

ANALYSIS SUMMARY:

Hits = 11
Lines analyzed = 1221 in approximately 0.07 seconds (16305 lines/second)
Physical Source Lines of Code (SLOC) = 971
Hits@level = [0]  46 [1]   1 [2]  10 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  57 [1+]  11 [2+]  10 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 58.7024 [1+] 11.3285 [2+] 10.2987 [3+]   0 [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.