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/mle-1.4.3/mark.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_bracket_pair.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_offset.c
Examining data/mle-1.4.3/tests/unit/test_mark_delete_before.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_to.c
Examining data/mle-1.4.3/tests/unit/test.h
Examining data/mle-1.4.3/tests/unit/test_mark_is_gt.c
Examining data/mle-1.4.3/tests/unit/test_buffer_add_srule.c
Examining data/mle-1.4.3/tests/unit/test_buffer_get.c
Examining data/mle-1.4.3/tests/unit/test_mark_delete_between_mark.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_vert.c
Examining data/mle-1.4.3/tests/unit/test_buffer_insert.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_eol.c
Examining data/mle-1.4.3/tests/unit/test_kinput.c
Examining data/mle-1.4.3/tests/unit/test_buffer_replace.c
Examining data/mle-1.4.3/tests/unit/test_bline_delete.c
Examining data/mle-1.4.3/tests/unit/test_buffer_destroy.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_col.c
Examining data/mle-1.4.3/tests/unit/test_bline_insert.c
Examining data/mle-1.4.3/tests/unit/test_buffer_set_callback.c
Examining data/mle-1.4.3/tests/unit/test_mark_delete_after.c
Examining data/mle-1.4.3/tests/unit/test_buffer_new.c
Examining data/mle-1.4.3/tests/unit/test_recalloc.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_next_str.c
Examining data/mle-1.4.3/tests/unit/test_buffer_add_mark.c
Examining data/mle-1.4.3/tests/unit/test_buffer_get_bline.c
Examining data/mle-1.4.3/tests/unit/test_buffer_remove_srule.c
Examining data/mle-1.4.3/tests/unit/test_buffer_redo.c
Examining data/mle-1.4.3/tests/unit/test_buffer_undo.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_bol.c
Examining data/mle-1.4.3/tests/unit/test_buffer_set.c
Examining data/mle-1.4.3/tests/unit/test_mark_delete_between_mark_2.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_by.c
Examining data/mle-1.4.3/tests/unit/test_mark_get_between_mark.c
Examining data/mle-1.4.3/tests/unit/test_mark_insert_after.c
Examining data/mle-1.4.3/tests/unit/test_mark_is_at_word_bound.c
Examining data/mle-1.4.3/tests/unit/test_mark_lettered.c
Examining data/mle-1.4.3/tests/unit/test_mark_swap_with_mark.c
Examining data/mle-1.4.3/tests/unit/test_bline_get_col.c
Examining data/mle-1.4.3/tests/unit/test_mark_get_offset.c
Examining data/mle-1.4.3/tests/unit/test_buffer_get_offset.c
Examining data/mle-1.4.3/tests/unit/test_mark_find_bracket_pair.c
Examining data/mle-1.4.3/tests/unit/test_buffer_get_bline_col.c
Examining data/mle-1.4.3/tests/unit/test_buffer_set_tab_width.c
Examining data/mle-1.4.3/tests/unit/test_buffer_substr.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_prev_re.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_next_re.c
Examining data/mle-1.4.3/tests/unit/test_buffer_register.c
Examining data/mle-1.4.3/tests/unit/test_mark_move_prev_str.c
Examining data/mle-1.4.3/tests/unit/test_buffer_delete.c
Examining data/mle-1.4.3/tests/unit/test_mark_clone.c
Examining data/mle-1.4.3/tests/unit/test_mark_set_pcre_ovector.c
Examining data/mle-1.4.3/tests/unit/test_mark_insert_before.c
Examining data/mle-1.4.3/cursor.c
Examining data/mle-1.4.3/bline.c
Examining data/mle-1.4.3/aproc.c
Examining data/mle-1.4.3/buffer.c
Examining data/mle-1.4.3/utf8.c
Examining data/mle-1.4.3/bview.c
Examining data/mle-1.4.3/main.c
Examining data/mle-1.4.3/cmd.c
Examining data/mle-1.4.3/mle.h
Examining data/mle-1.4.3/keys.h
Examining data/mle-1.4.3/editor.c
Examining data/mle-1.4.3/mlbuf.h
Examining data/mle-1.4.3/uscript.c
Examining data/mle-1.4.3/util.c

FINAL RESULTS:

data/mle-1.4.3/aproc.c:24:30:  [4] (shell) popen:
  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.
        if (!(aproc->rpipe = popen(shell_cmd, "r"))) {
data/mle-1.4.3/buffer.c:1064:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(tmppath, "%s", "/tmp/mle-XXXXXX");
data/mle-1.4.3/bview.c:683:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(newpath, "%s/%.*s", homedir, path_len-2, path+2);
data/mle-1.4.3/editor.c:425:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(keybuf, "%s", (pckey)); \
data/mle-1.4.3/editor.c:1967:15:  [4] (shell) popen:
  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.
    if ((fp = popen(rc_path, "r")) == NULL) {
data/mle-1.4.3/mlbuf.h:324:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(stderr, (fmt), __VA_ARGS__); \
data/mle-1.4.3/mle.h:604:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(stderr, (fmt), __VA_ARGS__); \
data/mle-1.4.3/mle.h:608:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf((editor)->errstr, MLE_ERRSTR_SIZE, (fmt), __VA_ARGS__); \
data/mle-1.4.3/mle.h:612:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf((editor)->infostr, MLE_ERRSTR_SIZE, (fmt), __VA_ARGS__); \
data/mle-1.4.3/uscript.c:395:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(ptrbuf, 32, "%" PRIxPTR, (uintptr_t)ptr);
data/mle-1.4.3/util.c:161:9:  [4] (shell) execlp:
  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.
        execlp(opt_shell, opt_shell, "-c", cmd, NULL);
data/mle-1.4.3/util.c:370: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), fmt, vl);
data/mle-1.4.3/util.c:390: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(bufo, sizeof(bufo), fmt, vl);
data/mle-1.4.3/bview.c:680:23:  [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.
        && (homedir = getenv("HOME")) != NULL
data/mle-1.4.3/editor.c:114:17:  [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("HOME")) {
data/mle-1.4.3/editor.c:115:45:  [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.
                asprintf(&home_rc, "%s/%s", getenv("HOME"), ".mlerc");
data/mle-1.4.3/editor.c:2070:33:  [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 (rv == MLE_OK && (c = getopt(argc, argv, "ha:b:c:H:i:K:k:l:M:m:Nn:p:S:s:t:vw:x:y:z:Q:")) != -1) {
data/mle-1.4.3/aproc.c:73: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 + 1];
data/mle-1.4.3/aproc.c:82:23:  [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).
        if ((*ttyfd = open("/dev/tty", O_RDONLY)) < 0) {
data/mle-1.4.3/buffer.c:83:19:  [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).
        if ((fd = open(path, O_RDONLY)) < 0) {
data/mle-1.4.3/buffer.c:146: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).
    if (!(fp = fopen(path, "wb"))) {
data/mle-1.4.3/buffer.c:296: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(data_cursor, bline->data, bline->data_len);
data/mle-1.4.3/buffer.c:877: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(data + data_len, tmp_line->data + copy_index, copy_len);
data/mle-1.4.3/buffer.c:1057: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 tmppath[16];
data/mle-1.4.3/buffer.c:1059: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 readbuf[1024];
data/mle-1.4.3/buffer.c:1065:13:  [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).
    tmpfd = mkstemp(tmppath);
data/mle-1.4.3/buffer.c:1125: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, self->data, self->data_len);
data/mle-1.4.3/buffer.c:1126: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(chars, self->chars, self->data_len * sizeof(bline_char_t));
data/mle-1.4.3/buffer.c:1483: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(new_line->data, bline->data + index, len);
data/mle-1.4.3/buffer.c:1610: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(bline->data + index, data, data_len);
data/mle-1.4.3/cmd.c:78:19:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            len = sprintf(insertbuf_cur, "%c", input->key);
data/mle-1.4.3/cmd.c:82:23:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                len = sprintf(insertbuf_cur, "%*c", (int)len, ' ');
data/mle-1.4.3/cmd.c:585: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 shell_cmd[32];
data/mle-1.4.3/cmd.c:589:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(shell_cmd, "find . -type f | fzy -l %d", nlines);
data/mle-1.4.3/cmd.c:746: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[6] = { 0 };
data/mle-1.4.3/cmd.c:783: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[6] = { 0 };
data/mle-1.4.3/cmd.c:795: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[6] = { 0 };
data/mle-1.4.3/cmd.c:836:12:  [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).
    vali = atoi(val);
data/mle-1.4.3/cmd.c:908: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 jumpa[3];
data/mle-1.4.3/cmd.c:938:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(jumpa, "%c%c", 'a' + (jumpi / 26), 'a' + (jumpi % 26));
data/mle-1.4.3/cmd.c:1058: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 out[32];
data/mle-1.4.3/cmd.c:1063: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_buf[32];
data/mle-1.4.3/cmd.c:1064: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_linenum[32];
data/mle-1.4.3/cmd.c:1078:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(tmp_linenum, "/tmp/mle-less-XXXXXX");
data/mle-1.4.3/cmd.c:1079:31:  [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).
        if ((tmp_linenum_fd = mkstemp(tmp_linenum)) < 0) {
data/mle-1.4.3/cmd.c:1083:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(tmp_buf, "/tmp/mle-less-XXXXXX");
data/mle-1.4.3/cmd.c:1084:27:  [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).
        if ((tmp_buf_fd = mkstemp(tmp_buf)) < 0) {
data/mle-1.4.3/cmd.c:1137: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/mle-1.4.3/cmd.c:1505: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[PATH_MAX];
data/mle-1.4.3/editor.c:432:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(keybuf, "M-");
data/mle-1.4.3/editor.c:1154: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(macro->inputs + macro->inputs_len, input, sizeof(kinput_t));
data/mle-1.4.3/editor.c:1369: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[64];
data/mle-1.4.3/editor.c:1741: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 *args[3];
data/mle-1.4.3/editor.c:1745:76:  [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).
    _editor_init_kmap(editor, ret_kmap, args[0], args[2] ? args[1] : NULL, atoi(args[2] ? args[2] : args[1]), NULL);
data/mle-1.4.3/editor.c:1751: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 *args[3];
data/mle-1.4.3/editor.c:1892: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 *args[4];
data/mle-1.4.3/editor.c:1897:63:  [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).
    _editor_init_syntax(editor, ret_syntax, args[0], args[1], atoi(args[2]), atoi(args[3]), NULL);
data/mle-1.4.3/editor.c:1897:78:  [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).
    _editor_init_syntax(editor, ret_syntax, args[0], args[1], atoi(args[2]), atoi(args[3]), NULL);
data/mle-1.4.3/editor.c:1915: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 *args[4];
data/mle-1.4.3/editor.c:1922:99:  [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).
    _editor_init_syntax_add_rule(syntax, &((srule_def_t){ args[0], style_i == 2 ? args[1] : NULL, atoi(args[style_i]), atoi(args[style_i + 1]) }));
data/mle-1.4.3/editor.c:1922:120:  [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).
    _editor_init_syntax_add_rule(syntax, &((srule_def_t){ args[0], style_i == 2 ? args[1] : NULL, atoi(args[style_i]), atoi(args[style_i + 1]) }));
data/mle-1.4.3/editor.c:1959: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[512];
data/mle-1.4.3/editor.c:2112: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).
                editor->tab_to_space = atoi(optarg) ? 1 : 0;
data/mle-1.4.3/editor.c:2115:51:  [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).
                editor->highlight_bracket_pairs = atoi(optarg) ? 1 : 0;
data/mle-1.4.3/editor.c:2118:37:  [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).
                editor->color_col = atoi(optarg);
data/mle-1.4.3/editor.c:2121:41:  [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).
                editor->headless_mode = atoi(optarg) ? 1 : 0;
data/mle-1.4.3/editor.c:2124:39:  [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).
                editor->auto_indent = atoi(optarg) ? 1 : 0;
data/mle-1.4.3/editor.c:2141: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).
                editor->linenum_type = atoi(optarg);
data/mle-1.4.3/editor.c:2184:37:  [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).
                editor->tab_width = atoi(optarg);
data/mle-1.4.3/editor.c:2191:37:  [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).
                editor->soft_wrap = atoi(optarg);
data/mle-1.4.3/editor.c:2207:38:  [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).
                editor->trim_paste = atoi(optarg) ? 1 : 0;
data/mle-1.4.3/editor.c:2256: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/mle-1.4.3/mark.c:19: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 bracket_pairs[8] = {
data/mle-1.4.3/mle.h:122: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 errstr[MLE_ERRSTR_SIZE];
data/mle-1.4.3/mle.h:123: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 infostr[MLE_ERRSTR_SIZE];
data/mle-1.4.3/mle.h:203: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 init_cwd[PATH_MAX + 1];
data/mle-1.4.3/mle.h:324: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 numeric[MLE_LOOP_CTX_MAX_NUMERIC_LEN + 1];
data/mle-1.4.3/mle.h:338: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 tab_complete_term[MLE_LOOP_CTX_MAX_COMPLETE_TERM_SIZE];
data/mle-1.4.3/mle.h:652:45:  [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 MLE_KINPUT_COPY(pi, pj)             memcpy(&(pi), &(pj), sizeof(pi))
data/mle-1.4.3/uscript.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 input_str[16];
data/mle-1.4.3/uscript.c:391: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 ptrbuf[32];
data/mle-1.4.3/utf8.c:7:23:  [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 unsigned char utf8_length[256] = {
data/mle-1.4.3/utf8.c:18:23:  [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 unsigned char utf8_mask[6] = {
data/mle-1.4.3/util.c:196:24:  [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).
        *optret_file = fopen(path, opt_mode);
data/mle-1.4.3/util.c:329: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(cmd + y, str + x, mb_len);
data/mle-1.4.3/util.c:367: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/mle-1.4.3/util.c:379: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 bufo[4096];
data/mle-1.4.3/util.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->data, data, data_len);
data/mle-1.4.3/util.c:502: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(str->data, data, data_len);
data/mle-1.4.3/util.c:504: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(str->data + str->len, data, data_len);
data/mle-1.4.3/util.c:555: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 hex[3];
data/mle-1.4.3/aproc.c:116:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                nbytes = read(aproc->rfd, &buf, 1024);
data/mle-1.4.3/buffer.c:77: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).
        if (!path || strlen(path) < 1) {
data/mle-1.4.3/buffer.c:141: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).
    if (!path || strlen(path) < 1) {
data/mle-1.4.3/buffer.c:1048: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).
        *ret_data_len = strlen(*ret_data);
data/mle-1.4.3/buffer.c:1071:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        nread = read(fd, &readbuf, 1024);
data/mle-1.4.3/buffer.c:1108:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (size != (size_t)read(fd, buf, size)) {
data/mle-1.4.3/bview.c:627:75:  [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 (util_pcre_match(syntax->path_pattern, self->buffer->path, strlen(self->buffer->path), NULL, NULL)) {
data/mle-1.4.3/bview.c:682: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).
        newpath = malloc(strlen(homedir) + 1 + (path_len - 2) + 1);
data/mle-1.4.3/bview.c:685: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).
        *ret_path_len = strlen(*ret_path);
data/mle-1.4.3/bview.c:689: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).
    *ret_path_len = strlen(*ret_path);
data/mle-1.4.3/bview.c:755: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).
    *ret_path_len = strlen(*ret_path);
data/mle-1.4.3/bview.c:920: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).
        int errstrlen = strlen(editor->errstr) + 5; // Add 5 for "err! "
data/mle-1.4.3/bview.c:924: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).
        int infostrlen = strlen(editor->infostr);
data/mle-1.4.3/cmd.c:76:19:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
            len = sprintf(insertbuf_cur, "\n");
data/mle-1.4.3/cmd.c:84:23:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
                len = sprintf(insertbuf_cur, "\t");
data/mle-1.4.3/cmd.c:296: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).
            mark_move_prev_re(cursor->mark, "[\\[\\(\\{]", strlen("[\\[\\(\\{]"));
data/mle-1.4.3/cmd.c:384: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).
    regex_len = strlen(regex);
data/mle-1.4.3/cmd.c:400: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).
    regex_len = strlen(ctx->bview->last_search);
data/mle-1.4.3/cmd.c:607: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).
    path_arg = util_escape_shell_arg(path, strlen(path));
data/mle-1.4.3/cmd.c:679:69:  [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).
    editor_open_bview(ctx->editor, NULL, MLE_BVIEW_TYPE_EDIT, path, strlen(path), 1, 0, 0, NULL, NULL);
data/mle-1.4.3/cmd.c:697: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).
    bview_open(ctx->bview, path, strlen(path));
data/mle-1.4.3/cmd.c:787:68:  [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).
    MLE_MULTI_CURSOR_MARK_FN(ctx->cursor, mark_move_next_str, str, strlen(str));
data/mle-1.4.3/cmd.c:799:68:  [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).
    MLE_MULTI_CURSOR_MARK_FN(ctx->cursor, mark_move_prev_str, str, strlen(str));
data/mle-1.4.3/cmd.c:885:48:  [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).
    code_escaped = util_escape_shell_arg(code, strlen(code));
data/mle-1.4.3/cmd.c:931:71:  [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).
        while (jumpi < 26*26 && mark_move_next_re_ex(mark, "\\S{2,}", strlen("\\S{2,}"), &bline, &col, &nchars) == MLBUF_OK) {
data/mle-1.4.3/cmd.c:1104:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        out_len = read(tmp_linenum_fd, &out, sizeof(out)-1);
data/mle-1.4.3/cmd.c:1301: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).
                .data_len = bview->buffer->path ? strlen(bview->buffer->path) : 0
data/mle-1.4.3/cmd.c:1480: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).
    re_len = re ? strlen(re) : 0;
data/mle-1.4.3/cmd.c:1491:70:  [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).
    editor_open_bview(ctx->editor, NULL, MLE_BVIEW_TYPE_EDIT, fname, strlen(fname), 1, 0, 0, NULL, &bview);
data/mle-1.4.3/cmd.c:1538:83:  [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).
        editor_open_bview(ctx->editor, NULL, MLE_BVIEW_TYPE_EDIT, corrected_path, strlen(corrected_path), 0, 0, 0, NULL, &new_bview);
data/mle-1.4.3/cmd.c:1564: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).
    prev_line_len = strlen(prev_line);
data/mle-1.4.3/cmd.c:1576:56:  [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).
            mark_insert_before(ctx->cursor->mark, tmp, strlen(tmp));
data/mle-1.4.3/cmd.c:1612: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).
        this_line_len = strlen(this_line);
data/mle-1.4.3/cmd.c:1613: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).
        prev_line_len = strlen(prev_line);
data/mle-1.4.3/cursor.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).
    if (mark_move_prev_re(cursor->mark, "(?<!\\\\)[`'\"]", strlen("(?<!\\\\)[`'\"]")) != MLBUF_OK) {
data/mle-1.4.3/cursor.c:178: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).
    if (mark_move_next_re_nudge(cursor->anchor, qre, strlen(qre)) != MLBUF_OK) {
data/mle-1.4.3/cursor.c:220: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).
        cur_len = strlen(cursor->cut_buffer);
data/mle-1.4.3/cursor.c:222:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        strncat(cursor->cut_buffer, cutbuf, cutbuf_len);
data/mle-1.4.3/cursor.c:241:50:  [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).
    mark_insert_before(cursor->mark, cut_buffer, strlen(cut_buffer));
data/mle-1.4.3/cursor.c:316:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (mark_find_next_re(search_mark, regex, strlen(regex), &bline, &col, &char_count) == MLBUF_OK
data/mle-1.4.3/editor.c:493:57:  [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).
    HASH_ADD_KEYPTR(hh, editor->cmd_map, new_cmd->name, strlen(new_cmd->name), new_cmd);
data/mle-1.4.3/editor.c:657: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(loop_ctx->tab_complete_term)
data/mle-1.4.3/editor.c:690:50:  [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).
            buffer_set(ctx->bview->buffer, term, strlen(term));
data/mle-1.4.3/editor.c:710:86:  [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).
        HASH_ADD_KEYPTR(hh, ctx->editor->prompt_history, prompt_history->prompt_str, strlen(prompt_history->prompt_str), prompt_history);
data/mle-1.4.3/editor.c:752:38:  [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).
    prompt_hnode->data_len = (bint_t)strlen(data);
data/mle-1.4.3/editor.c:1321:14:  [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).
    keylen = strlen(key);
data/mle-1.4.3/editor.c:1326: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).
        } else if (keylen == strlen((pckey)) && !strncmp((pckey), key, keylen)) { \
data/mle-1.4.3/editor.c:1670:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    HASH_ADD_KEYPTR(hh, editor->kmap_map, kmap->name, strlen(kmap->name), kmap);
data/mle-1.4.3/editor.c:1815:61:  [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).
        HASH_ADD_KEYPTR(hh, editor->macro_map, macro->name, strlen(macro->name), macro);
data/mle-1.4.3/editor.c:1885:59:  [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).
    HASH_ADD_KEYPTR(hh, editor->syntax_map, syntax->name, strlen(syntax->name), syntax);
data/mle-1.4.3/editor.c:1906:48:  [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).
        node->srule = srule_new_multi(def->re, strlen(def->re), def->re_end, strlen(def->re_end), def->fg, def->bg);
data/mle-1.4.3/editor.c:1906:78:  [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).
        node->srule = srule_new_multi(def->re, strlen(def->re), def->re_end, strlen(def->re_end), def->fg, def->bg);
data/mle-1.4.3/editor.c:1908: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).
        node->srule = srule_new_single(def->re, strlen(def->re), 0, def->fg, def->bg);
data/mle-1.4.3/editor.c:2246: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).
            path_len = strlen(path);
data/mle-1.4.3/editor.c:2283:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            nbytes = read(STDIN_FILENO, &buf, 1024);
data/mle-1.4.3/tests/unit/test.h:21: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).
    buffer_insert(buf, 0, (char*)str, (bint_t)strlen(str), NULL);
data/mle-1.4.3/tests/unit/test_mark_move_next_re.c:8:36:  [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).
    mark_move_next_re(cur, "an+a", strlen("an+a"));
data/mle-1.4.3/tests/unit/test_mark_move_next_re.c:12:36:  [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).
    mark_move_next_re(cur, "an+a", strlen("an+a"));
data/mle-1.4.3/tests/unit/test_mark_move_next_re.c:16:42:  [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).
    mark_move_next_re_nudge(cur, "an+a", strlen("an+a"));
data/mle-1.4.3/tests/unit/test_mark_move_next_re.c:20:42:  [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).
    mark_move_next_re_nudge(cur, "an+a", strlen("an+a"));
data/mle-1.4.3/tests/unit/test_mark_move_next_re.c:25: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).
    mark_move_next_re(cur, "hi", strlen("hi"));
data/mle-1.4.3/tests/unit/test_mark_move_next_str.c:8:36:  [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).
    mark_move_next_str(cur, "ana", strlen("ana"));
data/mle-1.4.3/tests/unit/test_mark_move_next_str.c:12:36:  [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).
    mark_move_next_str(cur, "ana", strlen("ana"));
data/mle-1.4.3/tests/unit/test_mark_move_next_str.c:16:42:  [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).
    mark_move_next_str_nudge(cur, "ana", strlen("ana"));
data/mle-1.4.3/tests/unit/test_mark_move_next_str.c:20:42:  [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).
    mark_move_next_str_nudge(cur, "ana", strlen("ana"));
data/mle-1.4.3/tests/unit/test_mark_move_prev_re.c:8:36:  [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).
    mark_move_prev_re(cur, "an+a", strlen("an+a"));
data/mle-1.4.3/tests/unit/test_mark_move_prev_re.c:12:36:  [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).
    mark_move_prev_re(cur, "an+a", strlen("an+a"));
data/mle-1.4.3/tests/unit/test_mark_move_prev_re.c:16:36:  [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).
    mark_move_prev_re(cur, "an+a", strlen("an+a"));
data/mle-1.4.3/tests/unit/test_mark_move_prev_re.c:21: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).
    mark_move_prev_re(cur, "^", strlen("^"));
data/mle-1.4.3/tests/unit/test_mark_move_prev_str.c:8:36:  [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).
    mark_move_prev_str(cur, "ana", strlen("ana"));
data/mle-1.4.3/tests/unit/test_mark_move_prev_str.c:12:36:  [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).
    mark_move_prev_str(cur, "ana", strlen("ana"));
data/mle-1.4.3/tests/unit/test_mark_move_prev_str.c:16:36:  [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).
    mark_move_prev_str(cur, "ana", strlen("ana"));
data/mle-1.4.3/tests/unit/test_mark_set_pcre_ovector.c:16: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).
    mark_find_next_re(cur, "age ([0-9]+)", strlen("age ([0-9]+)"), &bline, &col, &nchars);
data/mle-1.4.3/uscript.c:158:39:  [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).
        mark_insert_before(mark, str, strlen(str));
data/mle-1.4.3/uscript.c:383: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).
    if (ptr && strlen(ptr) > 0) {
data/mle-1.4.3/util.c:97:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                nbytes = read(readfd, readbuf.data + readbuf.len, 1024);
data/mle-1.4.3/util.c:259: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).
    subj_len = strlen(subj);
data/mle-1.4.3/util.c:450: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).
    str_append_len(str, data, strlen(data));
data/mle-1.4.3/util.c:472: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).
    str_prepend_len(str, data, strlen(data));
data/mle-1.4.3/util.c:482: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).
    str_set_len(str, data, strlen(data));
data/mle-1.4.3/util.c:558: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).
    repl_stop = repl + strlen(repl);
data/mle-1.4.3/util.c:602:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(hex, repl_backref+2, 2);

ANALYSIS SUMMARY:

Hits = 173
Lines analyzed = 11966 in approximately 0.31 seconds (38721 lines/second)
Physical Source Lines of Code (SLOC) = 9682
Hits@level = [0]  64 [1]  82 [2]  74 [3]   4 [4]  13 [5]   0
Hits@level+ = [0+] 237 [1+] 173 [2+]  91 [3+]  17 [4+]  13 [5+]   0
Hits/KSLOC@level+ = [0+] 24.4784 [1+] 17.8682 [2+] 9.39888 [3+] 1.75584 [4+] 1.3427 [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.