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/keyman-keyboardprocessor-11.0.101/include/keyman/keyboardprocessor_bits.h
Examining data/keyman-keyboardprocessor-11.0.101/include/keyman/keyboardprocessor_consts.h
Examining data/keyman-keyboardprocessor-11.0.101/include/keyman/keyboardprocessor_vkeys.h
Examining data/keyman-keyboardprocessor-11.0.101/src/context.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/json.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/json.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/keyboard.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/keyboard.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/km_kbp_processevent_api.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_actions.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_actions.h
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_capslock.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_consts.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_context.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_context.h
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_environment.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_environment.h
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_file.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_file.h
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_modifiers.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_options.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_options.h
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_processevent.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_processevent.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_processor.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_processor.h
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_xstring.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_xstring.h
Examining data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_base.h
Examining data/keyman-keyboardprocessor-11.0.101/src/mock/mock_processor.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/mock/mock_processor.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/option.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/option.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/path.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/processor.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/state.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/state.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/utfcodec.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/utfcodec.hpp
Examining data/keyman-keyboardprocessor-11.0.101/src/km_kbp_context_api.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/km_kbp_keyboard_api.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/km_kbp_options_api.cpp
Examining data/keyman-keyboardprocessor-11.0.101/src/km_kbp_state_api.cpp
Examining data/keyman-keyboardprocessor-11.0.101/tests/unit/json/jsontest.cpp
Examining data/keyman-keyboardprocessor-11.0.101/tests/unit/kmnkbd/context_api.cpp
Examining data/keyman-keyboardprocessor-11.0.101/tests/unit/kmnkbd/keyboard_api.cpp
Examining data/keyman-keyboardprocessor-11.0.101/tests/unit/kmnkbd/options_api.cpp
Examining data/keyman-keyboardprocessor-11.0.101/tests/unit/kmnkbd/state_api.cpp
Examining data/keyman-keyboardprocessor-11.0.101/tests/unit/kmx/kmx.cpp
Examining data/keyman-keyboardprocessor-11.0.101/tests/unit/utftest/utftest.cpp

FINAL RESULTS:

data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_base.h:7:9:  [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 snprintf _snprintf 
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_base.h:7:18:  [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 snprintf _snprintf 
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_base.h:8: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.
#define vsnprintf _vsnprintf 
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:53:3:  [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.
  vsnprintf(fmtbuf, sizeof(fmtbuf) / sizeof(fmtbuf[0]), fmt, vars);  // I2248   // I3547
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:60:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(windowinfo,
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:90:7:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
      strcat(buf, s_modifier_names[i].name);
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:107:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "['%s' 0x%x]", s_key_names[vk], vk);
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:156:5:  [4] (format) vwprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vwprintf(fmt, vars);
data/keyman-keyboardprocessor-11.0.101/src/json.hpp:51:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    void *getenv(unsigned int index) const { return _env[index]; }
data/keyman-keyboardprocessor-11.0.101/src/json.hpp:29: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          _contexts[128], // context stack
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_base.h:116: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[256];
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:49: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 fmtbuf[256];
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:59: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 windowinfo[1024];
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:85:10:  [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.
  static char buf[256];
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:101:10:  [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.
  static char buf[256];
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:110:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "[0x%x]", vk);
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:122:10:  [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.
  static char bufout[2][128 * 7];
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:128:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(q, "U+%4.4X ", *p); q = strchr(q, 0);
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:141:10:  [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.
  static char bufout[2][128 * 7];
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:147:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(q, "U+%4.4X ", *p); q = strchr(q, 0);
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_file.cpp:95:8:  [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).
  fp = fopen(fileName, "rb");
data/keyman-keyboardprocessor-11.0.101/src/mock/mock_processor.cpp:21:13:  [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.
  constexpr char const table[2][256][4] = {
data/keyman-keyboardprocessor-11.0.101/tests/unit/json/jsontest.cpp:24:9:  [2] (misc) open:
  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).
    log.open(argv[1]);
data/keyman-keyboardprocessor-11.0.101/tests/unit/kmnkbd/context_api.cpp:55: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     ctxt_u8_buffer[512] ={0,};
data/keyman-keyboardprocessor-11.0.101/src/kmx/kmx_debug.cpp:89:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      strcat(buf, " ");

ANALYSIS SUMMARY:

Hits = 25
Lines analyzed = 7379 in approximately 0.78 seconds (9455 lines/second)
Physical Source Lines of Code (SLOC) = 5434
Hits@level = [0]   2 [1]   1 [2]  15 [3]   1 [4]   8 [5]   0
Hits@level+ = [0+]  27 [1+]  25 [2+]  24 [3+]   9 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 4.96872 [1+] 4.60066 [2+] 4.41664 [3+] 1.65624 [4+] 1.47221 [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.