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/utf8.h-0~git20190120.2a7c5bf/utf8.h
Examining data/utf8.h-0~git20190120.2a7c5bf/test/test.cpp
Examining data/utf8.h-0~git20190120.2a7c5bf/test/test.c
Examining data/utf8.h-0~git20190120.2a7c5bf/test/utest.h
Examining data/utf8.h-0~git20190120.2a7c5bf/test/main.c

FINAL RESULTS:

data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:214: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(utest_state.output, __VA_ARGS__);                                  \
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:216:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf(__VA_ARGS__)
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:228:29:  [4] (format) snprintf:
  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.
#define UTEST_SNPRINTF(...) snprintf(__VA_ARGS__)
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:470: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 cat[512] = {'\0'};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:478: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 cat[512];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:489: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 cat[512];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:501: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 cat[512];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:514: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 cat[512];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:528: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 cat[512] = {'\0'};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:574: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 cpy[512] = {'\0'};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:643: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:655: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:667: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:679: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:691: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:702: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:713: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:724: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:734: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:744: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:753: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:762: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:775: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:787: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 invalid[6];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:804: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 cat[512] = {'\0'};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:811: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 cat[512] = {'\0'};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:816: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 cat[512] = {'\0'};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:833: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 cpy[512] = {'\0'};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:838: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 cpy[512] = {'\0'};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:844: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 buffer[11] = {0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:860: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 buffer[4] = {1, 2, 3, 4};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:927: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 buffer[129];
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:979: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(str, ascii1, sz + 1);
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:990: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(str, lowersStr, sz);
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:1001: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(str, uppersStr, sz);
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:1012: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(str, ascii1, sz + 1);
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:1023: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(str, lowersStr, sz);
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:1034: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(str, uppersStr, sz);
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:683:10:  [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).
  return fopen(filename, mode);
data/utf8.h-0~git20190120.2a7c5bf/utf8.h:272: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 c[5] = {'\0', '\0', '\0', '\0', '\0'};
data/utf8.h-0~git20190120.2a7c5bf/utf8.h:636: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 c[5] = {'\0', '\0', '\0', '\0', '\0'};
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:977:8:  [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).
  sz = strlen(ascii1);
data/utf8.h-0~git20190120.2a7c5bf/test/main.c:1010:8:  [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).
  sz = strlen(ascii1);
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:113:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#pragma section(".CRT$XCU", read)
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:491: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).
    const size_t name_size = strlen(name_part) + 1;                            \
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:532: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).
    const size_t name_size = strlen(name_part) + 1;                            \
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:574:32:  [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).
      const size_t name_size = strlen(name_part) + 32;                         \
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:702:51:  [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 (0 == utest_strncmp(argv[index], help_str, strlen(help_str))) {
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:712:55:  [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).
               utest_strncmp(argv[index], filter_str, strlen(filter_str))) {
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:714: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).
      filter = argv[index] + strlen(filter_str);
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:716:55:  [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).
               utest_strncmp(argv[index], output_str, strlen(output_str))) {
data/utf8.h-0~git20190120.2a7c5bf/test/utest.h:717: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).
      utest_state.output = utest_fopen(argv[index] + strlen(output_str), "w+");

ANALYSIS SUMMARY:

Hits = 52
Lines analyzed = 3189 in approximately 0.09 seconds (34946 lines/second)
Physical Source Lines of Code (SLOC) = 2294
Hits@level = [0]  15 [1]  11 [2]  38 [3]   0 [4]   3 [5]   0
Hits@level+ = [0+]  67 [1+]  52 [2+]  41 [3+]   3 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 29.2066 [1+] 22.6678 [2+] 17.8727 [3+] 1.30776 [4+] 1.30776 [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.