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/libnfo-1.0.1/libnfo-reader.c
Examining data/libnfo-1.0.1/src/nfo.h
Examining data/libnfo-1.0.1/src/nfo_priv.c
Examining data/libnfo-1.0.1/src/nfo_xml_utils.h
Examining data/libnfo-1.0.1/src/nfo_xml_utils.c
Examining data/libnfo-1.0.1/src/nfo_osdep.c
Examining data/libnfo-1.0.1/src/nfo_xml_parser.c
Examining data/libnfo-1.0.1/src/nfo_osdep.h
Examining data/libnfo-1.0.1/src/nfo.c
Examining data/libnfo-1.0.1/src/nfo_priv.h
Examining data/libnfo-1.0.1/src/nfo_xml_parser.h

FINAL RESULTS:

data/libnfo-1.0.1/src/nfo_osdep.c:42: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 (res, s, length);
data/libnfo-1.0.1/src/nfo_xml_parser.c:42:3:  [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 nfo_file[1024] = { 0 };
data/libnfo-1.0.1/src/nfo_xml_parser.c:344: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 tbn_season[1024] = { 0 };
data/libnfo-1.0.1/src/nfo_xml_parser.c:352:16:  [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).
      season = atoi (episode->season);
data/libnfo-1.0.1/src/nfo_xml_parser.c:355:7:  [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 guess[16] = { 0 };
data/libnfo-1.0.1/src/nfo_xml_parser.c:357:16:  [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).
      season = atoi (guess);
data/libnfo-1.0.1/src/nfo_xml_parser.c:368:7:  [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 tbn[1024] = { 0 };
data/libnfo-1.0.1/src/nfo_osdep.c:34: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).
  length = strlen (s);
data/libnfo-1.0.1/src/nfo_xml_parser.c:349:33:  [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).
    parent_path = strndup (dir, strlen (dir) - strlen (s));
data/libnfo-1.0.1/src/nfo_xml_parser.c:349:48:  [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).
    parent_path = strndup (dir, strlen (dir) - strlen (s));
data/libnfo-1.0.1/src/nfo_xml_parser.c:502: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).
  dir = strndup (filename, strlen (filename) - strlen (s));
data/libnfo-1.0.1/src/nfo_xml_parser.c:502:48:  [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).
  dir = strndup (filename, strlen (filename) - strlen (s));
data/libnfo-1.0.1/src/nfo_xml_parser.c:508:30:  [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).
  file = strndup (filename + strlen (dir) + 1,
data/libnfo-1.0.1/src/nfo_xml_parser.c:509:19:  [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).
                  strlen (filename) - strlen (dir) - strlen (s) - 1);
data/libnfo-1.0.1/src/nfo_xml_parser.c:509:39:  [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).
                  strlen (filename) - strlen (dir) - strlen (s) - 1);
data/libnfo-1.0.1/src/nfo_xml_parser.c:509:54:  [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).
                  strlen (filename) - strlen (dir) - strlen (s) - 1);

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 2467 in approximately 0.09 seconds (27551 lines/second)
Physical Source Lines of Code (SLOC) = 1801
Hits@level = [0]  26 [1]   9 [2]   7 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  42 [1+]  16 [2+]   7 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 23.3204 [1+] 8.88395 [2+] 3.88673 [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.