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/ruby-xmlparser-0.7.3/encoding.h
Examining data/ruby-xmlparser-0.7.3/xmlparser.c

FINAL RESULTS:

data/ruby-xmlparser-0.7.3/encoding.h:20: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.
  unsigned char ispfx[32];
data/ruby-xmlparser-0.7.3/encoding.h:21: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.
  unsigned char ischar[32];
data/ruby-xmlparser-0.7.3/encoding.h:36: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			name[40];
data/ruby-xmlparser-0.7.3/xmlparser.c:1179: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(ret->prefixes[i].ispfx, prefixes->ispfx,
data/ruby-xmlparser-0.7.3/xmlparser.c:1244: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 file[PATH_MAX] = "\0";
data/ruby-xmlparser-0.7.3/xmlparser.c:1269:13:  [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).
  if ((fp = fopen(file, "rb")) == NULL) {
data/ruby-xmlparser-0.7.3/xmlparser.c:1310:7:  [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(info->map, enc->firstmap, sizeof(int)*256);
data/ruby-xmlparser-0.7.3/xmlparser.c:1257:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(file, XML_ENC_PATH, PATH_MAX - 1);
data/ruby-xmlparser-0.7.3/xmlparser.c:1260: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).
  len = strlen(file);
data/ruby-xmlparser-0.7.3/xmlparser.c:1267:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
  strncat(file, encext, PATH_MAX - len -1);

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 2383 in approximately 0.07 seconds (34703 lines/second)
Physical Source Lines of Code (SLOC) = 2016
Hits@level = [0] 152 [1]   3 [2]   7 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+] 162 [1+]  10 [2+]   7 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 80.3571 [1+] 4.96032 [2+] 3.47222 [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.