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/dte-1.9.1/src/alias.c
Examining data/dte-1.9.1/src/alias.h
Examining data/dte-1.9.1/src/bind.c
Examining data/dte-1.9.1/src/bind.h
Examining data/dte-1.9.1/src/block-iter.c
Examining data/dte-1.9.1/src/block-iter.h
Examining data/dte-1.9.1/src/block.c
Examining data/dte-1.9.1/src/block.h
Examining data/dte-1.9.1/src/buffer.c
Examining data/dte-1.9.1/src/buffer.h
Examining data/dte-1.9.1/src/change.c
Examining data/dte-1.9.1/src/change.h
Examining data/dte-1.9.1/src/cmdline.c
Examining data/dte-1.9.1/src/cmdline.h
Examining data/dte-1.9.1/src/command-parse.c
Examining data/dte-1.9.1/src/command-run.c
Examining data/dte-1.9.1/src/command.c
Examining data/dte-1.9.1/src/command.h
Examining data/dte-1.9.1/src/compiler.c
Examining data/dte-1.9.1/src/compiler.h
Examining data/dte-1.9.1/src/completion.c
Examining data/dte-1.9.1/src/completion.h
Examining data/dte-1.9.1/src/config.c
Examining data/dte-1.9.1/src/config.h
Examining data/dte-1.9.1/src/ctags.c
Examining data/dte-1.9.1/src/ctags.h
Examining data/dte-1.9.1/src/debug.c
Examining data/dte-1.9.1/src/debug.h
Examining data/dte-1.9.1/src/edit.c
Examining data/dte-1.9.1/src/edit.h
Examining data/dte-1.9.1/src/editor.c
Examining data/dte-1.9.1/src/editor.h
Examining data/dte-1.9.1/src/editorconfig/editorconfig.c
Examining data/dte-1.9.1/src/editorconfig/editorconfig.h
Examining data/dte-1.9.1/src/editorconfig/ini.c
Examining data/dte-1.9.1/src/editorconfig/ini.h
Examining data/dte-1.9.1/src/editorconfig/match.c
Examining data/dte-1.9.1/src/editorconfig/match.h
Examining data/dte-1.9.1/src/encoding/bom.c
Examining data/dte-1.9.1/src/encoding/bom.h
Examining data/dte-1.9.1/src/encoding/convert.c
Examining data/dte-1.9.1/src/encoding/convert.h
Examining data/dte-1.9.1/src/encoding/decoder.c
Examining data/dte-1.9.1/src/encoding/decoder.h
Examining data/dte-1.9.1/src/encoding/encoder.c
Examining data/dte-1.9.1/src/encoding/encoder.h
Examining data/dte-1.9.1/src/encoding/encoding.c
Examining data/dte-1.9.1/src/encoding/encoding.h
Examining data/dte-1.9.1/src/env.c
Examining data/dte-1.9.1/src/env.h
Examining data/dte-1.9.1/src/error.c
Examining data/dte-1.9.1/src/error.h
Examining data/dte-1.9.1/src/file-history.c
Examining data/dte-1.9.1/src/file-history.h
Examining data/dte-1.9.1/src/file-option.c
Examining data/dte-1.9.1/src/file-option.h
Examining data/dte-1.9.1/src/filetype.c
Examining data/dte-1.9.1/src/filetype.h
Examining data/dte-1.9.1/src/filetype/basenames.c
Examining data/dte-1.9.1/src/filetype/extensions.c
Examining data/dte-1.9.1/src/filetype/ignored-exts.c
Examining data/dte-1.9.1/src/filetype/interpreters.c
Examining data/dte-1.9.1/src/filetype/names.c
Examining data/dte-1.9.1/src/filetype/signatures.c
Examining data/dte-1.9.1/src/frame.c
Examining data/dte-1.9.1/src/frame.h
Examining data/dte-1.9.1/src/history.c
Examining data/dte-1.9.1/src/history.h
Examining data/dte-1.9.1/src/indent.c
Examining data/dte-1.9.1/src/indent.h
Examining data/dte-1.9.1/src/load-save.c
Examining data/dte-1.9.1/src/load-save.h
Examining data/dte-1.9.1/src/lock.c
Examining data/dte-1.9.1/src/lock.h
Examining data/dte-1.9.1/src/main.c
Examining data/dte-1.9.1/src/mode-command.c
Examining data/dte-1.9.1/src/mode-git-open.c
Examining data/dte-1.9.1/src/mode-normal.c
Examining data/dte-1.9.1/src/mode-search.c
Examining data/dte-1.9.1/src/mode.h
Examining data/dte-1.9.1/src/move.c
Examining data/dte-1.9.1/src/move.h
Examining data/dte-1.9.1/src/msg.c
Examining data/dte-1.9.1/src/msg.h
Examining data/dte-1.9.1/src/options.c
Examining data/dte-1.9.1/src/options.h
Examining data/dte-1.9.1/src/parse-args.c
Examining data/dte-1.9.1/src/parse-args.h
Examining data/dte-1.9.1/src/regexp.c
Examining data/dte-1.9.1/src/regexp.h
Examining data/dte-1.9.1/src/screen-cmdline.c
Examining data/dte-1.9.1/src/screen-status.c
Examining data/dte-1.9.1/src/screen-tabbar.c
Examining data/dte-1.9.1/src/screen-view.c
Examining data/dte-1.9.1/src/screen.c
Examining data/dte-1.9.1/src/screen.h
Examining data/dte-1.9.1/src/search.c
Examining data/dte-1.9.1/src/search.h
Examining data/dte-1.9.1/src/selection.c
Examining data/dte-1.9.1/src/selection.h
Examining data/dte-1.9.1/src/spawn.c
Examining data/dte-1.9.1/src/spawn.h
Examining data/dte-1.9.1/src/syntax/bitset.c
Examining data/dte-1.9.1/src/syntax/bitset.h
Examining data/dte-1.9.1/src/syntax/color.c
Examining data/dte-1.9.1/src/syntax/color.h
Examining data/dte-1.9.1/src/syntax/highlight.c
Examining data/dte-1.9.1/src/syntax/highlight.h
Examining data/dte-1.9.1/src/syntax/state.c
Examining data/dte-1.9.1/src/syntax/state.h
Examining data/dte-1.9.1/src/syntax/syntax.c
Examining data/dte-1.9.1/src/syntax/syntax.h
Examining data/dte-1.9.1/src/tag.c
Examining data/dte-1.9.1/src/tag.h
Examining data/dte-1.9.1/src/terminal/color.c
Examining data/dte-1.9.1/src/terminal/color.h
Examining data/dte-1.9.1/src/terminal/ecma48.c
Examining data/dte-1.9.1/src/terminal/ecma48.h
Examining data/dte-1.9.1/src/terminal/input.c
Examining data/dte-1.9.1/src/terminal/input.h
Examining data/dte-1.9.1/src/terminal/key.c
Examining data/dte-1.9.1/src/terminal/key.h
Examining data/dte-1.9.1/src/terminal/no-op.c
Examining data/dte-1.9.1/src/terminal/no-op.h
Examining data/dte-1.9.1/src/terminal/output.c
Examining data/dte-1.9.1/src/terminal/output.h
Examining data/dte-1.9.1/src/terminal/terminal.c
Examining data/dte-1.9.1/src/terminal/terminal.h
Examining data/dte-1.9.1/src/terminal/terminfo.c
Examining data/dte-1.9.1/src/terminal/terminfo.h
Examining data/dte-1.9.1/src/terminal/xterm-keys.c
Examining data/dte-1.9.1/src/terminal/xterm.c
Examining data/dte-1.9.1/src/terminal/xterm.h
Examining data/dte-1.9.1/src/util/ascii.c
Examining data/dte-1.9.1/src/util/ascii.h
Examining data/dte-1.9.1/src/util/bit.h
Examining data/dte-1.9.1/src/util/checked-arith.h
Examining data/dte-1.9.1/src/util/exec.c
Examining data/dte-1.9.1/src/util/exec.h
Examining data/dte-1.9.1/src/util/hash.h
Examining data/dte-1.9.1/src/util/hashset.c
Examining data/dte-1.9.1/src/util/hashset.h
Examining data/dte-1.9.1/src/util/list.h
Examining data/dte-1.9.1/src/util/macros.h
Examining data/dte-1.9.1/src/util/path.c
Examining data/dte-1.9.1/src/util/path.h
Examining data/dte-1.9.1/src/util/ptr-array.c
Examining data/dte-1.9.1/src/util/ptr-array.h
Examining data/dte-1.9.1/src/util/readfile.c
Examining data/dte-1.9.1/src/util/readfile.h
Examining data/dte-1.9.1/src/util/str-util.h
Examining data/dte-1.9.1/src/util/string-view.h
Examining data/dte-1.9.1/src/util/string.c
Examining data/dte-1.9.1/src/util/string.h
Examining data/dte-1.9.1/src/util/strtonum.c
Examining data/dte-1.9.1/src/util/strtonum.h
Examining data/dte-1.9.1/src/util/unicode.c
Examining data/dte-1.9.1/src/util/unicode.h
Examining data/dte-1.9.1/src/util/utf8.c
Examining data/dte-1.9.1/src/util/utf8.h
Examining data/dte-1.9.1/src/util/wbuf.c
Examining data/dte-1.9.1/src/util/wbuf.h
Examining data/dte-1.9.1/src/util/wcwidth.c
Examining data/dte-1.9.1/src/util/xmalloc.c
Examining data/dte-1.9.1/src/util/xmalloc.h
Examining data/dte-1.9.1/src/util/xreadwrite.c
Examining data/dte-1.9.1/src/util/xreadwrite.h
Examining data/dte-1.9.1/src/util/xsnprintf.c
Examining data/dte-1.9.1/src/util/xsnprintf.h
Examining data/dte-1.9.1/src/view.c
Examining data/dte-1.9.1/src/view.h
Examining data/dte-1.9.1/src/window.c
Examining data/dte-1.9.1/src/window.h
Examining data/dte-1.9.1/test/cmdline.c
Examining data/dte-1.9.1/test/command.c
Examining data/dte-1.9.1/test/config.c
Examining data/dte-1.9.1/test/editorconfig.c
Examining data/dte-1.9.1/test/encoding.c
Examining data/dte-1.9.1/test/filetype.c
Examining data/dte-1.9.1/test/main.c
Examining data/dte-1.9.1/test/syntax.c
Examining data/dte-1.9.1/test/terminal.c
Examining data/dte-1.9.1/test/test.c
Examining data/dte-1.9.1/test/test.h
Examining data/dte-1.9.1/test/util.c

FINAL RESULTS:

data/dte-1.9.1/src/util/path.c:124:34:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
            ssize_t target_len = readlink(buf, target, sizeof(target));
data/dte-1.9.1/src/debug.c:50: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, ap);
data/dte-1.9.1/src/editor.c:312:5:  [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(buf, sizeof(buf), format, ap);
data/dte-1.9.1/src/error.c:47: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.
        vsnprintf(error_buf + pos, sizeof(error_buf) - pos, format, ap);
data/dte-1.9.1/src/error.c:64:5:  [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(error_buf, sizeof(error_buf), format, ap);
data/dte-1.9.1/src/main.c:232:13:  [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, argv[0]);
data/dte-1.9.1/src/terminal/output.c:100:13:  [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.
    int n = vsnprintf(NULL, 0, fmt, ap2);
data/dte-1.9.1/src/terminal/output.c:108:25:  [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.
            int wrote = vsnprintf(tmp, n + 1, fmt, ap);
data/dte-1.9.1/src/terminal/output.c:116:17:  [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.
    int wrote = vsnprintf(obuf.buf + obuf.count, n + 1, fmt, ap);
data/dte-1.9.1/src/terminal/terminal.c:72: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, ap);
data/dte-1.9.1/src/util/exec.c:96:5:  [4] (shell) execvp:
  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.
    execvp(argv[0], argv);
data/dte-1.9.1/src/util/string.c:79:13:  [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.
    int n = vsnprintf(NULL, 0, fmt, ap2);
data/dte-1.9.1/src/util/string.c:83:17:  [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.
    int wrote = vsnprintf(s->buffer + s->len, n + 1, fmt, ap);
data/dte-1.9.1/src/util/xmalloc.c:87:13:  [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.
    int n = vsnprintf(NULL, 0, format, ap2);
data/dte-1.9.1/src/util/xmalloc.c:93:13:  [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.
    int m = vsnprintf(*strp, n + 1, format, ap);
data/dte-1.9.1/src/util/xsnprintf.c:16:19:  [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.
    const int n = vsnprintf(buf, len, format, ap);
data/dte-1.9.1/src/window.c:120:47:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (b->st.st_mode != 0 && !b->readonly && access(filename, W_OK)) {
data/dte-1.9.1/test/test.c:14: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, format, ap);
data/dte-1.9.1/src/command-parse.c:130:27:  [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.
        const char *val = getenv(name);
data/dte-1.9.1/src/command.c:176: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.
        dir = getenv("OLDPWD");
data/dte-1.9.1/src/editor.c:87:31:  [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.
    const char *const pager = getenv("PAGER");
data/dte-1.9.1/src/editor.c:88:30:  [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.
    const char *const home = getenv("HOME");
data/dte-1.9.1/src/editor.c:89:34:  [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.
    const char *const dte_home = getenv("DTE_HOME");
data/dte-1.9.1/src/main.c:198:18:  [3] (buffer) getopt:
  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.
    while ((ch = getopt(argc, argv, optstring)) != -1) {
data/dte-1.9.1/src/terminal/terminal.c:81:30:  [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.
    const char *const term = getenv("TERM");
data/dte-1.9.1/src/terminal/terminal.c:86:9:  [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.
    if (getenv("DTE_FORCE_TERMINFO")) {
data/dte-1.9.1/src/terminal/terminal.c:121:29:  [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.
    const char *colorterm = getenv("COLORTERM");
data/dte-1.9.1/src/bind.c:76: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(b->cmd_str, cmd_str, cmd_str_len + 1);
data/dte-1.9.1/src/block-iter.c:311: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(buf + pos, blk->data + offset, count);
data/dte-1.9.1/src/block.c:330: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(blk->data + blk->size, next->data, next->size);
data/dte-1.9.1/src/buffer.c:72: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(&b->options, &editor.options, sizeof(CommonOptions));
data/dte-1.9.1/src/buffer.c:197: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(filename + 1, absolute + home_len, len);
data/dte-1.9.1/src/buffer.c:207: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 cwd[8192];
data/dte-1.9.1/src/change.c:89: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(change->buf + change->del_count, buf, len);
data/dte-1.9.1/src/change.c:96: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(buf + len, change->buf, change->del_count);
data/dte-1.9.1/src/command.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 cwd[8192];
data/dte-1.9.1/src/command.c:1550: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[32] = "/tmp/.dte.XXXXXX";
data/dte-1.9.1/src/command.c:1551: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(tmp);
data/dte-1.9.1/src/command.c:1620: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.
            char buf[512];
data/dte-1.9.1/src/command.h:10: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 flags[8];
data/dte-1.9.1/src/command.h:17:11:  [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.
    const char name[15];
data/dte-1.9.1/src/command.h:18:11:  [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.
    const char flags[7];
data/dte-1.9.1/src/completion.c:71: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[8192];
data/dte-1.9.1/src/completion.c:85: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(path, dirname, plen);
data/dte-1.9.1/src/completion.c: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(path + plen, name, len + 1);
data/dte-1.9.1/src/completion.c:159: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(s, str, len);
data/dte-1.9.1/src/completion.c:488: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(str, completion.head, head_len);
data/dte-1.9.1/src/completion.c:489: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(str + head_len, middle, middle_len);
data/dte-1.9.1/src/completion.c:494: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(str + head_len + middle_len, completion.tail, tail_len + 1);
data/dte-1.9.1/src/debug.c:66:14:  [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(filename, O_WRONLY | O_CREAT | O_APPEND, 0666);
data/dte-1.9.1/src/debug.c:75: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[4096];
data/dte-1.9.1/src/editor.c:309: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[4096];
data/dte-1.9.1/src/editorconfig/editorconfig.c:156:18:  [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 ecfilename[16] = "/.editorconfig";
data/dte-1.9.1/src/editorconfig/editorconfig.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 buf[8192];
data/dte-1.9.1/src/editorconfig/editorconfig.c:158: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(buf, ecfilename, sizeof ecfilename);
data/dte-1.9.1/src/editorconfig/editorconfig.c:177: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(buf, pathname, dir_len);
data/dte-1.9.1/src/editorconfig/editorconfig.c:178: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(buf + dir_len, ecfilename, sizeof ecfilename);
data/dte-1.9.1/src/encoding/bom.h:8:20:  [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.
    const unsigned char bytes[4];
data/dte-1.9.1/src/encoding/convert.c:18: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 replacement[2] = "\xc2\xbf"; // U+00BF
data/dte-1.9.1/src/encoding/convert.c:31: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 tbuf[16];
data/dte-1.9.1/src/encoding/convert.c:35: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 rbuf[4];
data/dte-1.9.1/src/encoding/convert.c:114: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(c->obuf + c->opos, c->rbuf, c->rcount);
data/dte-1.9.1/src/encoding/convert.c:231:17:  [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(c->tbuf, ib, ic);
data/dte-1.9.1/src/encoding/convert.c:255: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(c->rbuf, replacement, sizeof(replacement));
data/dte-1.9.1/src/encoding/encoding.c:20:11:  [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.
    const char alias[8];
data/dte-1.9.1/src/error.c:6:8:  [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 error_buf[256];
data/dte-1.9.1/src/file-history.c:72: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(e->filename, filename, filename_len);
data/dte-1.9.1/src/file-history.c:123:14:  [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).
    buf.fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666);
data/dte-1.9.1/src/file-option.c:35: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 cwd[8192];
data/dte-1.9.1/src/filetype.c:81: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(ft->data, name, name_len + 1);
data/dte-1.9.1/src/filetype.c:82: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(ft->data + name_len + 1, str, str_len + 1);
data/dte-1.9.1/src/filetype/basenames.c:2:11:  [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.
    const char key[16];
data/dte-1.9.1/src/filetype/extensions.c:2:11:  [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.
    const char ext[12];
data/dte-1.9.1/src/filetype/interpreters.c:2:11:  [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.
    const char key[8];
data/dte-1.9.1/src/filetype/names.c:91: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 builtin_filetype_names[NR_BUILTIN_FILETYPES][16] = {
data/dte-1.9.1/src/filetype/signatures.c:2:20:  [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.
    const unsigned char NONSTRING bytes[11];
data/dte-1.9.1/src/history.c:86:14:  [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).
    buf.fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666);
data/dte-1.9.1/src/load-save.c:48: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(blk->data + blk->size, line, len);
data/dte-1.9.1/src/load-save.c:226:14:  [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).
    int fd = open(filename, O_RDONLY);
data/dte-1.9.1/src/load-save.c:330: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[8192];
data/dte-1.9.1/src/load-save.c:341: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).
        fd = mkstemp(tmp);
data/dte-1.9.1/src/load-save.c:363:14:  [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(filename, O_CREAT | O_TRUNC | O_WRONLY, mode);
data/dte-1.9.1/src/lock.c:94:15:  [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).
        wfd = open(file_locks_lock, O_WRONLY | O_CREAT | O_EXCL, 0666);
data/dte-1.9.1/src/options.c:273: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[64];
data/dte-1.9.1/src/options.c:359: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[256];
data/dte-1.9.1/src/options.c:372: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(ptr, values[i], len);
data/dte-1.9.1/src/options.c:740:17:  [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(completion, prefix, prefix_len);
data/dte-1.9.1/src/options.c:741:17:  [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(completion + prefix_len, str, str_len + 1);
data/dte-1.9.1/src/regexp.c:37: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 msg[1024];
data/dte-1.9.1/src/screen-status.c:46: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/dte-1.9.1/src/screen-status.c:191: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[32];
data/dte-1.9.1/src/screen-status.c:215: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 lbuf[256];
data/dte-1.9.1/src/screen-status.c:216: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 rbuf[256];
data/dte-1.9.1/src/screen-tabbar.c:140: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[16];
data/dte-1.9.1/src/screen-tabbar.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 buf[16];
data/dte-1.9.1/src/screen.c:42: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 title[1024];
data/dte-1.9.1/src/screen.c:115: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[32];
data/dte-1.9.1/src/spawn.c:67: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 line[4096];
data/dte-1.9.1/src/spawn.c:118: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.
            char data[8192];
data/dte-1.9.1/src/spawn.c:154:14:  [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).
    int fd = open("/dev/null", flags);
data/dte-1.9.1/src/spawn.c:323: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.
void spawn(char **args, int fd[3], bool prompt)
data/dte-1.9.1/src/spawn.h:30: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.
void spawn(char **args, int fd[3], bool prompt);
data/dte-1.9.1/src/syntax/color.c:14: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 builtin_color_names[NR_BC][16] = {
data/dte-1.9.1/src/syntax/state.c:178: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(c->u.cond_bufis.str, str, len);
data/dte-1.9.1/src/syntax/state.c:445: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(c->u.cond_str.str, str, len);
data/dte-1.9.1/src/syntax/state.c:537: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 filename[4096];
data/dte-1.9.1/src/syntax/syntax.c:57: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[64];
data/dte-1.9.1/src/syntax/syntax.c:101: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 prefix[32];
data/dte-1.9.1/src/syntax/syntax.c:121: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 (
data/dte-1.9.1/src/syntax/syntax.c:288: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 full[64];
data/dte-1.9.1/src/syntax/syntax.h:49: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.
            char str[30];
data/dte-1.9.1/src/syntax/syntax.h:65: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.
            char str[31];
data/dte-1.9.1/src/tag.c:116: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(path + len, tags, sizeof(tags));
data/dte-1.9.1/src/tag.c:117:18:  [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).
        int fd = open(path, O_RDONLY);
data/dte-1.9.1/src/tag.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 path[4096];
data/dte-1.9.1/src/tag.c:256: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(filename, dir.data, dir.length);
data/dte-1.9.1/src/tag.c:258: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(filename + dir.length + 1, tag->filename, tag_filename_len + 1);
data/dte-1.9.1/src/terminal/ecma48.c:80: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[32] = "\033[0";
data/dte-1.9.1/src/terminal/input.c:15:8:  [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 input_buf[256];
data/dte-1.9.1/src/terminal/input.c:234: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(buf, input_buf, input_buf_fill);
data/dte-1.9.1/src/terminal/key.c:121:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define COPY(dest, src) memcpy(dest, src, STRLEN(src) + 1)
data/dte-1.9.1/src/terminal/key.c:125: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[32];
data/dte-1.9.1/src/terminal/key.c:160: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 (
data/dte-1.9.1/src/terminal/output.c:47: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(obuf.buf + obuf.count, str, count);
data/dte-1.9.1/src/terminal/output.c:189: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 tmp[4];
data/dte-1.9.1/src/terminal/output.c:192: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(obuf.buf + obuf.count, tmp + 4 - n, n);
data/dte-1.9.1/src/terminal/output.h:13: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[8192];
data/dte-1.9.1/src/terminal/terminal.c:28:15:  [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.
        const char name[14];
data/dte-1.9.1/src/util/exec.c:44:26:  [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 void handle_child(char **argv, int fd[3], int error_fd)
data/dte-1.9.1/src/util/exec.c:103: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.
pid_t fork_exec(char **argv, int fd[3])
data/dte-1.9.1/src/util/exec.h:9: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.
pid_t fork_exec(char **argv, int fd[3]) NONNULL_ARGS;
data/dte-1.9.1/src/util/hashset.c:102: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(h->str, str, str_len);
data/dte-1.9.1/src/util/path.c:23: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(dst + pos, src, len + 1);
data/dte-1.9.1/src/util/path.c: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 buf[8192];
data/dte-1.9.1/src/util/path.c:108: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.
            char target[8192];
data/dte-1.9.1/src/util/path.c:109: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.
            char tmp[8192];
data/dte-1.9.1/src/util/path.c:149:17:  [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(tmp, buf, buf_len);
data/dte-1.9.1/src/util/path.c:153: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(tmp + pos, target, target_len);
data/dte-1.9.1/src/util/path.c:157:17:  [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(tmp + pos, rest, rest_len);
data/dte-1.9.1/src/util/path.c:164: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(buf, tmp, pos + 1);
data/dte-1.9.1/src/util/path.c:235: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(filename + i * 3, "../", 3);
data/dte-1.9.1/src/util/path.c:237: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(filename + dotdot * 3, f + clen, tlen + 1);
data/dte-1.9.1/src/util/readfile.c:12:14:  [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).
    int fd = open(filename, O_RDONLY);
data/dte-1.9.1/src/util/string.c:69: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(s->buffer + s->len, ptr, len);
data/dte-1.9.1/src/util/string.c:118: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(b, s->buffer, len);
data/dte-1.9.1/src/util/utf8.c:228:18:  [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 hex_tab[16] = "0123456789abcdef";
data/dte-1.9.1/src/util/wbuf.c:50: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(wbuf->buf + wbuf->fill, buf, count);
data/dte-1.9.1/src/util/wbuf.h:10: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[8192];
data/dte-1.9.1/src/util/xmalloc.c:77: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(s, str, size);
data/dte-1.9.1/src/util/xmalloc.h:47: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(buf, ptr, size);
data/dte-1.9.1/test/terminal.c:12:15:  [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.
        const char *const strs[4];
data/dte-1.9.1/test/terminal.c:284: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 escape_sequence[8];
data/dte-1.9.1/test/terminal.c:326: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.
            char seq[8];
data/dte-1.9.1/test/terminal.c:327: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(seq, templates[i].escape_sequence, 8);
data/dte-1.9.1/test/terminal.c:357: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 escape_sequence[8];
data/dte-1.9.1/test/terminal.c:389: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.
            char seq[8];
data/dte-1.9.1/test/terminal.c:390: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(seq, templates[i].escape_sequence, 8);
data/dte-1.9.1/test/util.c:223:11:  [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.
    const char s1[8] = "Ctrl+Up";
data/dte-1.9.1/test/util.c:224:11:  [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.
    const char s2[8] = "CTRL+U_";
data/dte-1.9.1/test/util.c:357: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 ulong_max[64];
data/dte-1.9.1/test/util.c:613: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[16];
data/dte-1.9.1/test/util.c:646: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[16];
data/dte-1.9.1/test/util.c:964: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[8192 + 1];
data/dte-1.9.1/test/util.c:1046:11:  [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.
    const char *ptrs[256];
data/dte-1.9.1/test/util.c:1047: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 str[8];
data/dte-1.9.1/src/bind.c:73: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 cmd_str_len = strlen(cmd_str);
data/dte-1.9.1/src/buffer.c:177:23:  [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 home_len = strlen(editor.home_dir);
data/dte-1.9.1/src/buffer.c:178:22:  [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 abs_len = strlen(absolute);
data/dte-1.9.1/src/buffer.c:179:20:  [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 f_len = strlen(f);
data/dte-1.9.1/src/cmdline.c:172: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).
    const size_t text_len = strlen(text);
data/dte-1.9.1/src/command-parse.c:146: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).
        const size_t home_dir_len = strlen(editor.home_dir);
data/dte-1.9.1/src/command-run.c:15:18:  [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 len = strlen(name);
data/dte-1.9.1/src/command.c:539:22:  [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 ins_len = strlen(str);
data/dte-1.9.1/src/command.c:757: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).
        size_t len = comma ? comma - list : strlen(list);
data/dte-1.9.1/src/command.c:1316:22:  [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 len = strlen(word) + 5;
data/dte-1.9.1/src/completion.c:72: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 plen = strlen(dirname);
data/dte-1.9.1/src/completion.c:73: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).
    const size_t flen = strlen(fileprefix);
data/dte-1.9.1/src/completion.c:104:22:  [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 len = strlen(name);
data/dte-1.9.1/src/completion.c:145:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        strlen(completion.escaped),
data/dte-1.9.1/src/completion.c:157:26:  [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 len = strlen(str);
data/dte-1.9.1/src/completion.c:187:22:  [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 len = strlen(s);
data/dte-1.9.1/src/completion.c:483: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).
    size_t middle_len = strlen(middle);
data/dte-1.9.1/src/completion.c:484:23:  [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 head_len = strlen(completion.head);
data/dte-1.9.1/src/completion.c:485:23:  [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 tail_len = strlen(completion.tail);
data/dte-1.9.1/src/ctags.c:137: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).
    size_t prefix_len = strlen(prefix);
data/dte-1.9.1/src/edit.c:324: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).
        ins_count = strlen(ins);
data/dte-1.9.1/src/edit.c:375: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).
                    ins_count = strlen(ins);
data/dte-1.9.1/src/edit.c:657: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).
        ins_count = strlen(indent);
data/dte-1.9.1/src/edit.c:682: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).
        ins_count = strlen(ins);
data/dte-1.9.1/src/edit.c:801: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).
        .indent_len = indent ? strlen(indent) : 0,
data/dte-1.9.1/src/editor.c:315:18:  [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 pos = strlen(buf);
data/dte-1.9.1/src/editor.c:320: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).
    for (size_t i = 0, n = strlen(choices); i < n; i++) {
data/dte-1.9.1/src/file-history.c:44: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).
    const size_t filename_len = strlen(filename);
data/dte-1.9.1/src/file-history.c:79: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).
    const size_t len = strlen(str);
data/dte-1.9.1/src/file-history.c:143: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).
    const ssize_t idx = lookup_entry_index(filename, strlen(filename));
data/dte-1.9.1/src/file-option.c:43:20:  [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 n = strlen(cwd);
data/dte-1.9.1/src/file-option.c:98:62:  [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 (f && regexp_match_nosub(opt->type_or_pattern, f, strlen(f))) {
data/dte-1.9.1/src/filetype.c:56: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).
    const size_t name_len = strlen(name);
data/dte-1.9.1/src/filetype.c:57: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).
    const size_t str_len = strlen(str);
data/dte-1.9.1/src/load-save.c:277:18:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    mode_t old = umask(0);
data/dte-1.9.1/src/load-save.c:278:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(old);
data/dte-1.9.1/src/lock.c:28: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).
    size_t filename_len = strlen(filename);
data/dte-1.9.1/src/lock.c:141: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 n = strlen(filename) + 32;
data/dte-1.9.1/src/lock.c:144: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).
            size += strlen(buf + size);
data/dte-1.9.1/src/options.c:331: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(ptr);
data/dte-1.9.1/src/options.c:371:26:  [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 len = strlen(values[i]);
data/dte-1.9.1/src/options.c:738:34:  [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 str_len = strlen(str);
data/dte-1.9.1/src/screen-tabbar.c:231:20:  [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).
        int skip = strlen(buf) + u_str_width(filename) - width + 1;
data/dte-1.9.1/src/screen-tabbar.c:238:20:  [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 i = strlen(buf);
data/dte-1.9.1/src/spawn.c:120:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ssize_t rc = read(rfd, data, sizeof(data));
data/dte-1.9.1/src/syntax/state.c:165: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).
    const size_t len = strlen(str);
data/dte-1.9.1/src/syntax/state.c:429:18:  [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 len = strlen(str);
data/dte-1.9.1/src/tag.c:110:22:  [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 len = strlen(path);
data/dte-1.9.1/src/tag.c:209: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 dlen = strlen(dir);
data/dte-1.9.1/src/tag.c:253: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).
    const size_t tag_filename_len = strlen(tag->filename);
data/dte-1.9.1/src/terminal/color.c:101:18:  [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 len = strlen(str);
data/dte-1.9.1/src/terminal/color.c:160: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).
    const unsigned int a = lookup_attr(str, strlen(str));
data/dte-1.9.1/src/terminal/input.c:40:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t rc = read (
data/dte-1.9.1/src/terminal/input.c:265:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            n = read(STDIN_FILENO, buf + count, alloc - count);
data/dte-1.9.1/src/terminal/key.c:76: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).
    const size_t len = strlen(str);
data/dte-1.9.1/src/terminal/terminal.c:41: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).
    const size_t term_len = strlen(term);
data/dte-1.9.1/src/terminal/terminfo.c:346: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).
            const size_t code_len = strlen(code);
data/dte-1.9.1/src/terminal/xterm.c:19: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).
    term_add_bytes(title, strlen(title));
data/dte-1.9.1/src/util/exec.c:125:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const ssize_t rc = read(ep[0], &error, sizeof(error));
data/dte-1.9.1/src/util/hashset.c:65:43:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        if (str_len == h->str_len && set->equal(str, h->str, str_len)) {
data/dte-1.9.1/src/util/hashset.c:117: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 str_len = strlen(str);
data/dte-1.9.1/src/util/hashset.h:19:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    bool (*equal)(const void *s1, const void *s2, size_t n);
data/dte-1.9.1/src/util/hashset.h:38: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).
    return mem_intern(str, strlen(str));
data/dte-1.9.1/src/util/path.c:13:15:  [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).
        pos = strlen(dst);
data/dte-1.9.1/src/util/path.c:17: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).
    const size_t len = strlen(src);
data/dte-1.9.1/src/util/path.c:78: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).
            memmove(sp, ep + 1, strlen(ep + 1) + 1);
data/dte-1.9.1/src/util/path.c:94: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).
            memmove(sp, ep + 1, strlen(ep + 1) + 1);
data/dte-1.9.1/src/util/path.c:118: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).
                rest_len = strlen(rest);
data/dte-1.9.1/src/util/path.c:230: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 tlen = strlen(f + clen);
data/dte-1.9.1/src/util/str-util.h:32: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).
    return strncmp(str, prefix, strlen(prefix)) == 0;
data/dte-1.9.1/src/util/str-util.h:38:17:  [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 l1 = strlen(str);
data/dte-1.9.1/src/util/str-util.h:39:17:  [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 l2 = strlen(suffix);
data/dte-1.9.1/src/util/string-view.h:56: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).
        .length = str ? strlen(str) : 0
data/dte-1.9.1/src/util/string-view.h:87:44:  [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 string_view_equal_strn(sv, str, strlen(str));
data/dte-1.9.1/src/util/string.c:55: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).
    string_add_buf(s, str, strlen(str));
data/dte-1.9.1/src/util/strtonum.c:102: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).
    const size_t len = strlen(str);
data/dte-1.9.1/src/util/strtonum.c:117: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).
    const size_t len = strlen(str);
data/dte-1.9.1/src/util/strtonum.c:132: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).
    const size_t len = strlen(str);
data/dte-1.9.1/src/util/strtonum.c:147: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).
    const size_t len = strlen(str);
data/dte-1.9.1/src/util/wbuf.c:57:34:  [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 wbuf_write(wbuf, str, strlen(str));
data/dte-1.9.1/src/util/xmalloc.c:65: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).
    const size_t len = strlen(str);
data/dte-1.9.1/src/util/xreadwrite.c:10:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t rc = read(fd, b + pos, count - pos);
data/dte-1.9.1/test/terminal.c:259: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).
        const size_t seq_length = strlen(seq);
data/dte-1.9.1/test/terminal.c:332: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).
            size_t seq_length = strlen(seq);
data/dte-1.9.1/test/terminal.c:395: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).
            size_t seq_length = strlen(seq);
data/dte-1.9.1/test/util.c:781: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).
    EXPECT_NONNULL(hashset_get(&set, last_string, strlen(last_string)));
data/dte-1.9.1/test/util.c:785: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).
        const size_t len = strlen(str);

ANALYSIS SUMMARY:

Hits = 252
Lines analyzed = 29436 in approximately 1.13 seconds (26071 lines/second)
Physical Source Lines of Code (SLOC) = 25193
Hits@level = [0]  12 [1]  87 [2] 138 [3]   9 [4]  17 [5]   1
Hits@level+ = [0+] 264 [1+] 252 [2+] 165 [3+]  27 [4+]  18 [5+]   1
Hits/KSLOC@level+ = [0+] 10.4791 [1+] 10.0028 [2+] 6.54944 [3+] 1.07173 [4+] 0.714484 [5+] 0.0396936
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.