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/ifmetric-0.3/src/getifn.h
Examining data/ifmetric-0.3/src/getifn.c
Examining data/ifmetric-0.3/src/nlrequest.h
Examining data/ifmetric-0.3/src/nlrequest.c
Examining data/ifmetric-0.3/src/ifmetric.c

FINAL RESULTS:

data/ifmetric-0.3/src/getifn.c:8: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 ifname[IFNAMSIZ+1];
data/ifmetric-0.3/src/getifn.c:48:9:  [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 a[1024];
data/ifmetric-0.3/src/ifmetric.c:55:25:  [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(copy, n, n->nlmsg_len);
data/ifmetric-0.3/src/ifmetric.c:77:9:  [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 a[1024];
data/ifmetric-0.3/src/ifmetric.c:202:25:  [2] (integer) atoi:
  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).
    metric = argc > 2 ? atoi(argv[2]) : 0;
data/ifmetric-0.3/src/nlrequest.c:47:9:  [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 replybuf[4096];
data/ifmetric-0.3/src/nlrequest.c:110:5:  [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 (RTA_DATA(rta), data, alen);
data/ifmetric-0.3/src/nlrequest.c:133:5:  [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 (RTA_DATA(rta), &data, 4);
data/ifmetric-0.3/src/getifn.c:60:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(gi.ifname, iface, IFNAMSIZ);

ANALYSIS SUMMARY:

Hits = 9
Lines analyzed = 448 in approximately 0.04 seconds (11924 lines/second)
Physical Source Lines of Code (SLOC) = 322
Hits@level = [0]  18 [1]   1 [2]   8 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  27 [1+]   9 [2+]   8 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 83.8509 [1+] 27.9503 [2+] 24.8447 [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.