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/libxkbcommon-1.0.3/bench/bench.c
Examining data/libxkbcommon-1.0.3/bench/bench.h
Examining data/libxkbcommon-1.0.3/bench/compose.c
Examining data/libxkbcommon-1.0.3/bench/key-proc.c
Examining data/libxkbcommon-1.0.3/bench/rules.c
Examining data/libxkbcommon-1.0.3/bench/rulescomp.c
Examining data/libxkbcommon-1.0.3/bench/x11.c
Examining data/libxkbcommon-1.0.3/fuzz/compose/target.c
Examining data/libxkbcommon-1.0.3/fuzz/keymap/target.c
Examining data/libxkbcommon-1.0.3/src/atom.c
Examining data/libxkbcommon-1.0.3/src/atom.h
Examining data/libxkbcommon-1.0.3/src/compose/parser.c
Examining data/libxkbcommon-1.0.3/src/compose/parser.h
Examining data/libxkbcommon-1.0.3/src/compose/paths.c
Examining data/libxkbcommon-1.0.3/src/compose/paths.h
Examining data/libxkbcommon-1.0.3/src/compose/state.c
Examining data/libxkbcommon-1.0.3/src/compose/table.c
Examining data/libxkbcommon-1.0.3/src/compose/table.h
Examining data/libxkbcommon-1.0.3/src/context-priv.c
Examining data/libxkbcommon-1.0.3/src/context.c
Examining data/libxkbcommon-1.0.3/src/context.h
Examining data/libxkbcommon-1.0.3/src/darray.h
Examining data/libxkbcommon-1.0.3/src/keymap-priv.c
Examining data/libxkbcommon-1.0.3/src/keymap.c
Examining data/libxkbcommon-1.0.3/src/keymap.h
Examining data/libxkbcommon-1.0.3/src/keysym-utf.c
Examining data/libxkbcommon-1.0.3/src/keysym.c
Examining data/libxkbcommon-1.0.3/src/keysym.h
Examining data/libxkbcommon-1.0.3/src/ks_tables.h
Examining data/libxkbcommon-1.0.3/src/registry.c
Examining data/libxkbcommon-1.0.3/src/scanner-utils.h
Examining data/libxkbcommon-1.0.3/src/state.c
Examining data/libxkbcommon-1.0.3/src/text.c
Examining data/libxkbcommon-1.0.3/src/text.h
Examining data/libxkbcommon-1.0.3/src/utf8.c
Examining data/libxkbcommon-1.0.3/src/utf8.h
Examining data/libxkbcommon-1.0.3/src/util-list.c
Examining data/libxkbcommon-1.0.3/src/util-list.h
Examining data/libxkbcommon-1.0.3/src/utils.c
Examining data/libxkbcommon-1.0.3/src/utils.h
Examining data/libxkbcommon-1.0.3/src/x11/keymap.c
Examining data/libxkbcommon-1.0.3/src/x11/state.c
Examining data/libxkbcommon-1.0.3/src/x11/util.c
Examining data/libxkbcommon-1.0.3/src/x11/x11-priv.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/action.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/action.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/ast-build.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/ast-build.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/ast.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/compat.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/expr.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/expr.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/include.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/include.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/keycodes.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/keymap-dump.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/keymap.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/parser-priv.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/rules.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/rules.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/scanner.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/symbols.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/types.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/vmod.c
Examining data/libxkbcommon-1.0.3/src/xkbcomp/vmod.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/xkbcomp-priv.h
Examining data/libxkbcommon-1.0.3/src/xkbcomp/xkbcomp.c
Examining data/libxkbcommon-1.0.3/test/atom.c
Examining data/libxkbcommon-1.0.3/test/buffercomp.c
Examining data/libxkbcommon-1.0.3/test/common.c
Examining data/libxkbcommon-1.0.3/test/compose.c
Examining data/libxkbcommon-1.0.3/test/context.c
Examining data/libxkbcommon-1.0.3/test/evdev-scancodes.h
Examining data/libxkbcommon-1.0.3/test/filecomp.c
Examining data/libxkbcommon-1.0.3/test/keymap.c
Examining data/libxkbcommon-1.0.3/test/keyseq.c
Examining data/libxkbcommon-1.0.3/test/keysym.c
Examining data/libxkbcommon-1.0.3/test/log.c
Examining data/libxkbcommon-1.0.3/test/registry.c
Examining data/libxkbcommon-1.0.3/test/rules-file-includes.c
Examining data/libxkbcommon-1.0.3/test/rules-file.c
Examining data/libxkbcommon-1.0.3/test/rulescomp.c
Examining data/libxkbcommon-1.0.3/test/state.c
Examining data/libxkbcommon-1.0.3/test/stringcomp.c
Examining data/libxkbcommon-1.0.3/test/test.h
Examining data/libxkbcommon-1.0.3/test/utf8.c
Examining data/libxkbcommon-1.0.3/test/utils.c
Examining data/libxkbcommon-1.0.3/test/x11.c
Examining data/libxkbcommon-1.0.3/test/x11comp.c
Examining data/libxkbcommon-1.0.3/tools/compile-keymap.c
Examining data/libxkbcommon-1.0.3/tools/how-to-type.c
Examining data/libxkbcommon-1.0.3/tools/interactive-evdev.c
Examining data/libxkbcommon-1.0.3/tools/interactive-wayland.c
Examining data/libxkbcommon-1.0.3/tools/interactive-x11.c
Examining data/libxkbcommon-1.0.3/tools/registry-list.c
Examining data/libxkbcommon-1.0.3/tools/tools-common.c
Examining data/libxkbcommon-1.0.3/tools/tools-common.h
Examining data/libxkbcommon-1.0.3/tools/xkbcli.c
Examining data/libxkbcommon-1.0.3/xkbcommon/xkbcommon-compat.h
Examining data/libxkbcommon-1.0.3/xkbcommon/xkbcommon-compose.h
Examining data/libxkbcommon-1.0.3/xkbcommon/xkbcommon-keysyms.h
Examining data/libxkbcommon-1.0.3/xkbcommon/xkbcommon-names.h
Examining data/libxkbcommon-1.0.3/xkbcommon/xkbcommon-x11.h
Examining data/libxkbcommon-1.0.3/xkbcommon/xkbcommon.h
Examining data/libxkbcommon-1.0.3/xkbcommon/xkbregistry.h

FINAL RESULTS:

data/libxkbcommon-1.0.3/src/compose/parser.c:656: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(production.string, val.string.str);
data/libxkbcommon-1.0.3/src/context.c:246:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, args);
data/libxkbcommon-1.0.3/src/registry.c:474:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, args);
data/libxkbcommon-1.0.3/src/registry.c:1077:10:  [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.
    rc = vsnprintf(&buf[slen], sizeof(buf) - slen, msg, args);
data/libxkbcommon-1.0.3/src/text.c:286:12:  [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).
    return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf);
data/libxkbcommon-1.0.3/src/text.c:315:12:  [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).
    return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf);
data/libxkbcommon-1.0.3/src/text.c:347:12:  [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).
    return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf);
data/libxkbcommon-1.0.3/src/utils.c:192:11:  [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.
    ret = vsnprintf(NULL, 0, fmt, ap_copy);
data/libxkbcommon-1.0.3/src/utils.c:201:16:  [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.
    if ((ret = vsnprintf(buf, ret + 1, fmt, ap)) < 0) {
data/libxkbcommon-1.0.3/src/utils.h:310:10:  [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.
    rc = vsnprintf(buf, sz, format, ap);
data/libxkbcommon-1.0.3/src/xkbcomp/keymap-dump.c:91:15:  [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.
    printed = vsnprintf(buf->buf + buf->size, available, fmt, args);
data/libxkbcommon-1.0.3/src/xkbcomp/keymap-dump.c:105:15:  [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.
    printed = vsnprintf(buf->buf + buf->size, available, fmt, args);
data/libxkbcommon-1.0.3/tools/interactive-wayland.c:173:5:  [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(name, path);
data/libxkbcommon-1.0.3/tools/interactive-wayland.c:174:5:  [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(name, template);
data/libxkbcommon-1.0.3/tools/tools-common.c:232:5:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    execv(executable, argv);
data/libxkbcommon-1.0.3/tools/xkbcli.c:35:5:  [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("Usage: xkbcli [--help|-h] [--version|-V] <command> [<args>]\n"
data/libxkbcommon-1.0.3/bench/key-proc.c:78:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand((unsigned) time(NULL));
data/libxkbcommon-1.0.3/src/utils.h:242:24:  [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.
# define secure_getenv getenv
data/libxkbcommon-1.0.3/test/atom.c:81:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(seed);
data/libxkbcommon-1.0.3/test/common.c:171:14:  [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.
    srcdir = getenv("top_srcdir");
data/libxkbcommon-1.0.3/test/context.c:58:15:  [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.
    char *v = getenv(key);
data/libxkbcommon-1.0.3/tools/compile-keymap.c:140: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(argc, argv, "h", opts, &option_index);
data/libxkbcommon-1.0.3/tools/how-to-type.c:83:15:  [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.
        opt = getopt_long(argc, argv, "h", opts, &option_index);
data/libxkbcommon-1.0.3/tools/interactive-evdev.c:437:15:  [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.
        opt = getopt_long(argc, argv, "h", opts, &option_index);
data/libxkbcommon-1.0.3/tools/interactive-wayland.c:163:12:  [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.
    path = getenv("XDG_RUNTIME_DIR");
data/libxkbcommon-1.0.3/tools/registry-list.c:74: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(argc, argv, "hev", opts, &option_index);
data/libxkbcommon-1.0.3/tools/xkbcli.c:91: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(argc, argv, "+hV", opts, &option_index);
data/libxkbcommon-1.0.3/bench/compose.c:49:12:  [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).
    file = fopen(path, "rb");
data/libxkbcommon-1.0.3/fuzz/compose/target.c:34:16:  [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).
        file = fopen(argv[1], "rb");
data/libxkbcommon-1.0.3/fuzz/keymap/target.c:33:16:  [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).
        file = fopen(argv[1], "rb");
data/libxkbcommon-1.0.3/src/compose/parser.c:320: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 string[256];
data/libxkbcommon-1.0.3/src/compose/parser.c:481:12:  [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).
    file = fopen(path, "rb");
data/libxkbcommon-1.0.3/src/compose/paths.c:56: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 path[512];
data/libxkbcommon-1.0.3/src/compose/paths.c:71:12:  [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).
    file = fopen(path, "rb");
data/libxkbcommon-1.0.3/src/compose/state.c:168: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 name[64];
data/libxkbcommon-1.0.3/src/compose/table.c:180:16:  [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).
        file = fopen(path, "rb");
data/libxkbcommon-1.0.3/src/compose/table.c:188:16:  [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).
        file = fopen(path, "rb");
data/libxkbcommon-1.0.3/src/compose/table.c:196:16:  [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).
        file = fopen(path, "rb");
data/libxkbcommon-1.0.3/src/compose/table.c:204:16:  [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).
        file = fopen(path, "rb");
data/libxkbcommon-1.0.3/src/context.h:52: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 text_buffer[2048];
data/libxkbcommon-1.0.3/src/darray.h:101: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((arr).item + __oldSize, items, __count * sizeof(*(arr).item)); \
data/libxkbcommon-1.0.3/src/darray.h:108:9:  [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((arr).item, items, __count * sizeof(*(arr).item)); \
data/libxkbcommon-1.0.3/src/darray.h:133: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((arr).item + __oldSize, items, __count * sizeof(*(arr).item)); \
data/libxkbcommon-1.0.3/src/darray.h:142: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((arr).item, items, __count * sizeof(*(arr).item)); \
data/libxkbcommon-1.0.3/src/registry.c:547: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 rules[PATH_MAX];
data/libxkbcommon-1.0.3/src/registry.c:655: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 rules[PATH_MAX];
data/libxkbcommon-1.0.3/src/registry.c:1066: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.
    static char buf[PATH_MAX];
data/libxkbcommon-1.0.3/src/scanner-utils.h:50: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/libxkbcommon-1.0.3/src/state.c:999: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 tmp[7];
data/libxkbcommon-1.0.3/src/state.c:1018:13:  [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(buffer + offset, tmp, ret);
data/libxkbcommon-1.0.3/src/text.c:260: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] = {0};
data/libxkbcommon-1.0.3/src/text.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/libxkbcommon-1.0.3/src/text.c:321: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/libxkbcommon-1.0.3/src/utils.h:135:9:  [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(p, mem, nmemb * size);
data/libxkbcommon-1.0.3/src/utils.h:148: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(p, s, len);
data/libxkbcommon-1.0.3/src/x11/keymap.c:316:9:  [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(action->priv.data, wire->noaction.pad0, 7);
data/libxkbcommon-1.0.3/src/xkbcomp/ast-build.c:742:14:  [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 const char *xkb_file_type_strings[_FILE_TYPE_NUM_ENTRIES] = {
data/libxkbcommon-1.0.3/src/xkbcomp/ast-build.c:760:14:  [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 const char *stmt_type_strings[_STMT_NUM_VALUES] = {
data/libxkbcommon-1.0.3/src/xkbcomp/ast-build.c:785:14:  [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 const char *expr_op_type_strings[_EXPR_NUM_VALUES] = {
data/libxkbcommon-1.0.3/src/xkbcomp/ast-build.c:812:14:  [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 const char *expr_value_type_strings[_EXPR_TYPE_NUM_VALUES] = {
data/libxkbcommon-1.0.3/src/xkbcomp/compat.c:409:9:  [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(into->leds, from->leds, sizeof(*from->leds) * from->num_leds);
data/libxkbcommon-1.0.3/src/xkbcomp/include.c:177:14:  [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 const char *xkb_file_type_include_dirs[_FILE_TYPE_NUM_ENTRIES] = {
data/libxkbcommon-1.0.3/src/xkbcomp/include.c:254:16:  [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).
        file = fopen(buf, "rb");
data/libxkbcommon-1.0.3/src/xkbcomp/keycodes.c:312:9:  [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(into->led_names, from->led_names,
data/libxkbcommon-1.0.3/src/xkbcomp/keycodes.c:472: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 buf[20];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:48:17:  [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 unsigned char gperf_downcase[256] =
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:147: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 stringpool_str3[sizeof("key")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:148: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 stringpool_str4[sizeof("keys")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:149: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 stringpool_str7[sizeof("augment")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:150: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 stringpool_str9[sizeof("text")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:151: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 stringpool_str10[sizeof("xkb_keymap")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:152: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 stringpool_str11[sizeof("keypad_keys")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:153: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 stringpool_str12[sizeof("xkb_keycodes")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:154: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 stringpool_str13[sizeof("xkb_geometry")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:155: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 stringpool_str14[sizeof("xkb_types")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:156: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 stringpool_str15[sizeof("xkb_compat")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:157: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 stringpool_str17[sizeof("replace")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:158: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 stringpool_str19[sizeof("xkb_compat_map")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:159: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 stringpool_str20[sizeof("xkb_layout")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:160: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 stringpool_str21[sizeof("xkb_symbols")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:161: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 stringpool_str22[sizeof("xkb_compatibility")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:162: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 stringpool_str23[sizeof("xkb_semantics")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:163: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 stringpool_str24[sizeof("type")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:164: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 stringpool_str25[sizeof("alias")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:165: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 stringpool_str26[sizeof("xkb_compatibility_map")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:166: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 stringpool_str27[sizeof("alphanumeric_keys")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:167: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 stringpool_str28[sizeof("function_keys")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:168: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 stringpool_str29[sizeof("alternate")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:169: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 stringpool_str30[sizeof("shape")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:170: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 stringpool_str31[sizeof("action")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:171: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 stringpool_str32[sizeof("section")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:172: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 stringpool_str33[sizeof("row")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:173: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 stringpool_str34[sizeof("logo")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:174: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 stringpool_str35[sizeof("alternate_group")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:175: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 stringpool_str36[sizeof("hidden")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:176: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 stringpool_str37[sizeof("virtual")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:177: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 stringpool_str42[sizeof("outline")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:178: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 stringpool_str43[sizeof("default")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:179: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 stringpool_str46[sizeof("modmap")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:180: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 stringpool_str47[sizeof("virtual_modifiers")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:181: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 stringpool_str52[sizeof("overlay")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:182: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 stringpool_str53[sizeof("override")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:183: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 stringpool_str57[sizeof("include")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:184: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 stringpool_str62[sizeof("modifier_map")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:185: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 stringpool_str63[sizeof("modifier_keys")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:186: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 stringpool_str64[sizeof("indicator")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:187: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 stringpool_str66[sizeof("group")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:188: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 stringpool_str67[sizeof("mod_map")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:189: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 stringpool_str69[sizeof("interpret")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:190: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 stringpool_str71[sizeof("solid")];
data/libxkbcommon-1.0.3/src/xkbcomp/keywords.c:191: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 stringpool_str72[sizeof("partial")];
data/libxkbcommon-1.0.3/src/xkbcomp/rules.c:423:12:  [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).
    file = fopen(s.buf, "rb");
data/libxkbcommon-1.0.3/src/xkbcomp/symbols.c:577:40:  [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).
            next_incl.explicit_group = atoi(stmt->modifier) - 1;
data/libxkbcommon-1.0.3/test/common.c:78: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 ksbuf[64];
data/libxkbcommon-1.0.3/test/common.c:198:10:  [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).
    fd = open(path, O_RDONLY);
data/libxkbcommon-1.0.3/test/common.c:277:12:  [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).
    file = fopen(path, "rb");
data/libxkbcommon-1.0.3/test/compose.c:72: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 buffer[64];
data/libxkbcommon-1.0.3/test/compose.c:183:12:  [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).
    file = fopen(path, "rb");
data/libxkbcommon-1.0.3/test/compose.c:357:12:  [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).
    file = fopen(path, "rb");
data/libxkbcommon-1.0.3/test/context.c:45:1:  [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 *dirnames[64];
data/libxkbcommon-1.0.3/test/keysym.c:59: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 s[16];
data/libxkbcommon-1.0.3/test/keysym.c:72: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 s[8];
data/libxkbcommon-1.0.3/test/keysym.c:119: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 expected_name[64];
data/libxkbcommon-1.0.3/test/keysym.c:120: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 actual_name[64];
data/libxkbcommon-1.0.3/test/registry.c:106: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[PATH_MAX];
data/libxkbcommon-1.0.3/test/registry.c:121: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).
    fp = fopen(buf, "w");
data/libxkbcommon-1.0.3/test/registry.c:198: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 path[PATH_MAX];
data/libxkbcommon-1.0.3/test/state.c:594: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[256];
data/libxkbcommon-1.0.3/test/state.c:669: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[256];
data/libxkbcommon-1.0.3/test/utf8.c:157: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 buffer[7];
data/libxkbcommon-1.0.3/test/utils.c:37: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 buffer[10];
data/libxkbcommon-1.0.3/test/x11comp.c:45: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 display[512];
data/libxkbcommon-1.0.3/tools/compile-keymap.c:50:14:  [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 const char *includes[64];
data/libxkbcommon-1.0.3/tools/compile-keymap.c:259:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    file = tmpfile();
data/libxkbcommon-1.0.3/tools/compile-keymap.c:266: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 buf[4096];
data/libxkbcommon-1.0.3/tools/how-to-type.c:58: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 name[200];
data/libxkbcommon-1.0.3/tools/interactive-evdev.c:113:10:  [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).
    fd = open(path, O_NONBLOCK | O_CLOEXEC | O_RDONLY);
data/libxkbcommon-1.0.3/tools/interactive-evdev.c:496:22:  [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).
        FILE *file = fopen(keymap_path, "rb");
data/libxkbcommon-1.0.3/tools/interactive-wayland.c:124:14:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    int fd = mkstemp(tmpname);
data/libxkbcommon-1.0.3/tools/tools-common.c:63: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 s[16];
data/libxkbcommon-1.0.3/tools/tools-common.c:209: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 *argv[64] = {NULL};
data/libxkbcommon-1.0.3/tools/tools-common.c:210: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 executable[PATH_MAX];
data/libxkbcommon-1.0.3/src/compose/parser.c:429:29:  [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(production->string) + 1);
data/libxkbcommon-1.0.3/src/compose/paths.c:82:16:  [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).
    name_len = strlen(name);
data/libxkbcommon-1.0.3/src/context-priv.c:56:49:  [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).
    return atom_intern(ctx->atom_table, string, strlen(string), false);
data/libxkbcommon-1.0.3/src/darray.h:121:37:  [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).
    darray_append_items(arr, __str, strlen(__str) + 1); \
data/libxkbcommon-1.0.3/src/keymap-priv.c:49:53:  [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(builtin_mods[i]));
data/libxkbcommon-1.0.3/src/keymap.c:164:52:  [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).
    return xkb_keymap_new_from_buffer(ctx, string, strlen(string),
data/libxkbcommon-1.0.3/src/keysym.c:213:35:  [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).
        memmove(&tmp[4], &tmp[5], strlen(s) - 5 + 1);
data/libxkbcommon-1.0.3/src/registry.c:742: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 (!*name || !strlen(*name))  {
data/libxkbcommon-1.0.3/src/utils.h:97:29:  [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).
    return istrncmp(s1, s2, strlen(s1)) == 0;
data/libxkbcommon-1.0.3/src/utils.h:109:16:  [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).
    return s ? strlen(s) : 0;
data/libxkbcommon-1.0.3/src/utils.h:143: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).
    size_t slen = strlen(s);
data/libxkbcommon-1.0.3/src/xkbcomp/action.c:702: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).
            len = strlen(str);
data/libxkbcommon-1.0.3/src/xkbcomp/action.c:711:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy((char *) act->data, str, sizeof(act->data));
data/libxkbcommon-1.0.3/test/atom.c:95:31:  [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 (arr[i].len != strlen(string) ||
data/libxkbcommon-1.0.3/test/atom.c:99:25:  [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(string), string);
data/libxkbcommon-1.0.3/test/atom.c:125:27:  [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 (arr[i].len != strlen(string) ||
data/libxkbcommon-1.0.3/test/atom.c:129:21:  [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(string), string);
data/libxkbcommon-1.0.3/test/buffercomp.c:49:49:  [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).
    keymap = test_compile_buffer(ctx, original, strlen(original));
data/libxkbcommon-1.0.3/test/buffercomp.c:61: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).
                (unsigned long) strlen(dump),
data/libxkbcommon-1.0.3/test/buffercomp.c:62: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).
                (unsigned long) strlen(original));
data/libxkbcommon-1.0.3/test/buffercomp.c:84:45:  [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).
    keymap = test_compile_buffer(ctx, dump, strlen(dump));
data/libxkbcommon-1.0.3/test/common.c:216:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((count = read(fd, tmp, remaining))) {
data/libxkbcommon-1.0.3/test/compose.c:164:60:  [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).
    table = xkb_compose_table_new_from_buffer(ctx, buffer, strlen(buffer), "",
data/libxkbcommon-1.0.3/test/compose.c:478:47:  [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(table_string), "C",
data/libxkbcommon-1.0.3/test/keysym.c:80:24:  [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).
            (unsigned) strlen(expected));
data/libxkbcommon-1.0.3/test/keysym.c:82:24:  [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).
            (unsigned) strlen(s));
data/libxkbcommon-1.0.3/test/state.c:599:63:  [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).
    assert(xkb_state_key_get_utf8(state, key + 8, NULL, 0) == strlen(expected_utf8)); \
data/libxkbcommon-1.0.3/test/state.c:600:72:  [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).
    assert(xkb_state_key_get_utf8(state, key + 8, buf, sizeof(buf)) == strlen(expected_utf8)); \
data/libxkbcommon-1.0.3/test/state.c:624:64:  [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).
    assert(xkb_state_key_get_utf8(state, KEY_6 + 8, buf, 0) == strlen("HELLO"));
data/libxkbcommon-1.0.3/test/state.c:626:64:  [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).
    assert(xkb_state_key_get_utf8(state, KEY_6 + 8, buf, 1) == strlen("HELLO"));
data/libxkbcommon-1.0.3/test/state.c:628:64:  [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).
    assert(xkb_state_key_get_utf8(state, KEY_6 + 8, buf, 2) == strlen("HELLO"));
data/libxkbcommon-1.0.3/test/state.c:630:64:  [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).
    assert(xkb_state_key_get_utf8(state, KEY_6 + 8, buf, 3) == strlen("HELLO"));
data/libxkbcommon-1.0.3/test/state.c:632:64:  [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).
    assert(xkb_state_key_get_utf8(state, KEY_6 + 8, buf, 5) == strlen("HELLO"));
data/libxkbcommon-1.0.3/test/state.c:634:64:  [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).
    assert(xkb_state_key_get_utf8(state, KEY_6 + 8, buf, 6) == strlen("HELLO"));
data/libxkbcommon-1.0.3/test/state.c:636:64:  [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).
    assert(xkb_state_key_get_utf8(state, KEY_6 + 8, buf, 7) == strlen("HELLO"));
data/libxkbcommon-1.0.3/test/stringcomp.c:61: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).
                (unsigned long) strlen(dump),
data/libxkbcommon-1.0.3/test/stringcomp.c:62: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).
                (unsigned long) strlen(original));
data/libxkbcommon-1.0.3/test/x11comp.c:149: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).
                (unsigned long) strlen(dump),
data/libxkbcommon-1.0.3/test/x11comp.c:150: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).
                (unsigned long) strlen(original));
data/libxkbcommon-1.0.3/tools/interactive-evdev.c:299:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((len = read(kbd->fd, &evs, sizeof(evs))) > 0) {
data/libxkbcommon-1.0.3/tools/interactive-wayland.c:169: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).
    name = malloc(strlen(path) + sizeof(template));

ANALYSIS SUMMARY:

Hits = 183
Lines analyzed = 45439 in approximately 1.36 seconds (33417 lines/second)
Physical Source Lines of Code (SLOC) = 33209
Hits@level = [0] 261 [1]  41 [2] 115 [3]  11 [4]  16 [5]   0
Hits@level+ = [0+] 444 [1+] 183 [2+] 142 [3+]  27 [4+]  16 [5+]   0
Hits/KSLOC@level+ = [0+] 13.3699 [1+] 5.51055 [2+] 4.27595 [3+] 0.813033 [4+] 0.481797 [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.