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/edac-utils-0.18/src/lib/edac.h
Examining data/edac-utils-0.18/src/lib/libedac.c
Examining data/edac-utils-0.18/src/util/edac-util.c
Examining data/edac-utils-0.18/src/util/list.c
Examining data/edac-utils-0.18/src/util/list.h
Examining data/edac-utils-0.18/src/util/split.c
Examining data/edac-utils-0.18/src/util/split.h

FINAL RESULTS:

data/edac-utils-0.18/src/lib/libedac.c:497:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    n = vsnprintf (buf, sizeof (buf) - 1, format, ap); 
data/edac-utils-0.18/src/lib/libedac.c:529:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    n = vsnprintf (buf, sizeof (buf) - 1, format, ap); 
data/edac-utils-0.18/src/util/edac-util.c:628:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf (stderr, USAGE, prog_ctx.progname);
data/edac-utils-0.18/src/util/edac-util.c:671:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        n = vsnprintf (p, len, format, ap);
data/edac-utils-0.18/src/util/edac-util.c:689:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy (p, suffix);
data/edac-utils-0.18/src/util/edac-util.c:229:13:  [3] (buffer) getopt_long:
  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.
        c = getopt_long (ac, av, opt_string, opt_table, NULL);
data/edac-utils-0.18/src/lib/edac.h:84: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           id[EDAC_NAME_LEN];       /* Id of memory controller (mcN) */
data/edac-utils-0.18/src/lib/edac.h:85: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           mc_name[EDAC_NAME_LEN];  /* Name of MC (e.g. "E7525")     */
data/edac-utils-0.18/src/lib/edac.h:97: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          dimm_label[EDAC_LABEL_LEN]; 
data/edac-utils-0.18/src/lib/edac.h:104: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          id[EDAC_NAME_LEN];       /* CSROW Identity (e.g. csrow0)  */
data/edac-utils-0.18/src/lib/libedac.c:490: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                      buf[1024];
data/edac-utils-0.18/src/lib/libedac.c:521: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                      buf[1024];
data/edac-utils-0.18/src/lib/libedac.c:664: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 fq_subdir [SYSFS_PATH_MAX + 1];
data/edac-utils-0.18/src/util/edac-util.c:292: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                buf [1024];
data/edac-utils-0.18/src/util/edac-util.c:634: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  buf[4096];
data/edac-utils-0.18/src/lib/libedac.c:318:15:  [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).
    int len = strlen (str);
data/edac-utils-0.18/src/lib/libedac.c:361:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (info->id, dev->name, sizeof (info->id) - 1);
data/edac-utils-0.18/src/lib/libedac.c:397:28:  [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).
    if (*(p = i->mc_name + strlen (i->mc_name) - 1) == '\n')
data/edac-utils-0.18/src/lib/libedac.c:456:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (mc->info.id, dev->name, sizeof (mc->info.id) - 1);
data/edac-utils-0.18/src/lib/libedac.c:546:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (dest, attr->value, len - 1);
data/edac-utils-0.18/src/util/edac-util.c:358:36:  [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).
        if (strncmp (str, r->name, strlen (str)) == 0)
data/edac-utils-0.18/src/util/edac-util.c:687:38:  [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).
        q = buf + sizeof (buf) - 1 - strlen (suffix);
data/edac-utils-0.18/src/util/edac-util.c:690:14:  [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).
        p += strlen (suffix);
data/edac-utils-0.18/src/util/split.c:78:13:  [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).
        if (strlen (tok) > 0)

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 2929 in approximately 0.42 seconds (6966 lines/second)
Physical Source Lines of Code (SLOC) = 1794
Hits@level = [0]  26 [1]   9 [2]   9 [3]   1 [4]   5 [5]   0
Hits@level+ = [0+]  50 [1+]  24 [2+]  15 [3+]   6 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 27.8707 [1+] 13.3779 [2+] 8.3612 [3+] 3.34448 [4+] 2.78707 [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.