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/libtecla-1.6.3/history.c
Examining data/libtecla-1.6.3/enhance.c
Examining data/libtecla-1.6.3/ioutil.h
Examining data/libtecla-1.6.3/cplmatch.h
Examining data/libtecla-1.6.3/cplmatch.c
Examining data/libtecla-1.6.3/keytab.h
Examining data/libtecla-1.6.3/chrqueue.c
Examining data/libtecla-1.6.3/freelist.c
Examining data/libtecla-1.6.3/hash.c
Examining data/libtecla-1.6.3/getline.h
Examining data/libtecla-1.6.3/cplfile.h
Examining data/libtecla-1.6.3/direader.h
Examining data/libtecla-1.6.3/expand.c
Examining data/libtecla-1.6.3/cplfile.c
Examining data/libtecla-1.6.3/pcache.c
Examining data/libtecla-1.6.3/hash.h
Examining data/libtecla-1.6.3/stringrp.c
Examining data/libtecla-1.6.3/errmsg.h
Examining data/libtecla-1.6.3/expand.h
Examining data/libtecla-1.6.3/pathutil.c
Examining data/libtecla-1.6.3/strngmem.h
Examining data/libtecla-1.6.3/homedir.h
Examining data/libtecla-1.6.3/freelist.h
Examining data/libtecla-1.6.3/history.h
Examining data/libtecla-1.6.3/strngmem.c
Examining data/libtecla-1.6.3/keytab.c
Examining data/libtecla-1.6.3/stringrp.h
Examining data/libtecla-1.6.3/version.c
Examining data/libtecla-1.6.3/ioutil.c
Examining data/libtecla-1.6.3/demo3.c
Examining data/libtecla-1.6.3/direader.c
Examining data/libtecla-1.6.3/demo2.c
Examining data/libtecla-1.6.3/homedir.c
Examining data/libtecla-1.6.3/demo.c
Examining data/libtecla-1.6.3/chrqueue.h
Examining data/libtecla-1.6.3/errmsg.c
Examining data/libtecla-1.6.3/pathutil.h
Examining data/libtecla-1.6.3/libtecla.h
Examining data/libtecla-1.6.3/getline.c

FINAL RESULTS:

data/libtecla-1.6.3/cplfile.c:849:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(cf->buff->name, suffix);
data/libtecla-1.6.3/cplmatch.c:335:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(string + word_end - word_start, suffix);
data/libtecla-1.6.3/enhance.c:135:8:  [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.
    if(execvp(argv[1], argv + 1) < 0) {
data/libtecla-1.6.3/enhance.c:234:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(slave_name, name);
data/libtecla-1.6.3/enhance.c:273:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(master_name, PTY_DEV_DIR);
data/libtecla-1.6.3/enhance.c:274:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(master_name, PTY_CNTRL);
data/libtecla-1.6.3/enhance.c:275:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(master_name, ext);
data/libtecla-1.6.3/enhance.c:282:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(slave_name, PTY_DEV_DIR);
data/libtecla-1.6.3/enhance.c:283:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(slave_name, PTY_SLAVE);
data/libtecla-1.6.3/enhance.c:284:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(slave_name, ext);
data/libtecla-1.6.3/enhance.c:523:6:  [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.
  if(execvp(argv[0], argv) < 0) {
data/libtecla-1.6.3/getline.c:4252:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(gl->cutbuf, gl->line);
data/libtecla-1.6.3/getline.c:4284:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(gl->cutbuf, gl->line + gl->buff_curpos);
data/libtecla-1.6.3/getline.c:5962:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(gl->term, term);
data/libtecla-1.6.3/getline.c:7818:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(gl->vi.undo.line, gl->line);
data/libtecla-1.6.3/getline.c:7857:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(undo_ptr, line_ptr);
data/libtecla-1.6.3/getline.c:7860:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(line_ptr, undo_ptr);
data/libtecla-1.6.3/getline.c:8509:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(*sptr, string);
data/libtecla-1.6.3/getline.c:10000:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(gl->prompt, prompt);
data/libtecla-1.6.3/hash.c:504:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(node->symbol.name, name);
data/libtecla-1.6.3/pathutil.c:428:5:  [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.
    access(pathname, X_OK) == 0;
data/libtecla-1.6.3/pcache.c:1476:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(pc->path->name, suffix);
data/libtecla-1.6.3/stringrp.c:198:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(copy, string);
data/libtecla-1.6.3/cplfile.c:367: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.
      value = getenv(cf->envnam);
data/libtecla-1.6.3/demo2.c:296: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.
  if(pca_scan_path(res->pc, getenv("PATH")))
data/libtecla-1.6.3/expand.c:1106: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.
      value = getenv(ef->envnam);
data/libtecla-1.6.3/getline.c:2013: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.
  if(_gl_change_terminal(gl, stdin, stdout, getenv("TERM")))
data/libtecla-1.6.3/getline.c:9398: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((env = getenv("LINES")) && (n=atoi(env)) > 0)
data/libtecla-1.6.3/getline.c:9415: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((env = getenv("COLUMNS")) && (n=atoi(env)) > 0)
data/libtecla-1.6.3/homedir.c:238:16:  [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.
    home_dir = getenv("HOME");
data/libtecla-1.6.3/homedir.c:447:21:  [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 *pwd = getenv("PWD");
data/libtecla-1.6.3/chrqueue.c:61:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char bytes[GL_CQ_SIZE];    /* The fixed size buffer of this node */
data/libtecla-1.6.3/chrqueue.c:253: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(cq->buffers.tail->bytes + boff, chars + ndone, nnew);
data/libtecla-1.6.3/cplfile.c:79:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char usrnam[USR_LEN+1];      /* The buffer used when reading the names of */
data/libtecla-1.6.3/cplfile.c:81:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char envnam[ENV_LEN+1];      /* The buffer used when reading the names of */
data/libtecla-1.6.3/cplfile.c:664: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(pathname + start, FS_DIR_SEP, FS_DIR_SEP_LEN);
data/libtecla-1.6.3/demo3.c:689:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&action.sa_mask, mask, sizeof(*mask));
data/libtecla-1.6.3/enhance.c:110:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char slave_name[PTY_MAX_NAME]; /* The filename of the slave end of the */
data/libtecla-1.6.3/enhance.c:209:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char master_name[PTY_MAX_NAME]; /* The filename of the master device */
data/libtecla-1.6.3/enhance.c:223:12:  [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).
  *cntrl = open("/dev/ptmx", O_RDWR);
data/libtecla-1.6.3/enhance.c:276:11:  [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).
	*cntrl = open(master_name, O_RDWR);
data/libtecla-1.6.3/enhance.c:342:8:  [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(slave_name, O_RDWR);
data/libtecla-1.6.3/errmsg.c:43:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char msg[ERR_MSG_LEN+1];  /* An error message */
data/libtecla-1.6.3/expand.c:107:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char usrnam[USR_LEN+1]; /* A user name */
data/libtecla-1.6.3/expand.c:108:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char envnam[ENV_LEN+1]; /* An environment variable name */
data/libtecla-1.6.3/getline.c:429:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char keybuf[GL_KEY_MAX+1]; /* A buffer of currently unprocessed key presses */
data/libtecla-1.6.3/getline.c:2110:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char keyseq[2];
data/libtecla-1.6.3/getline.c:2483:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&act.sa_mask, &gl->all_signal_set, sizeof(sigset_t));
data/libtecla-1.6.3/getline.c:4081:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char string[TAB_WIDTH + 4]; /* A work area for composing compound strings */
data/libtecla-1.6.3/getline.c:4103: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(string, "\\%o", (int)(unsigned char)c);
data/libtecla-1.6.3/getline.c:4376: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(gl->cutbuf, gl->line + gl->buff_curpos, nc);
data/libtecla-1.6.3/getline.c:4882:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char from[3];     /* The original string of 2 characters */
data/libtecla-1.6.3/getline.c:4883:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char swap[3];     /* The swapped string of two characters */
data/libtecla-1.6.3/getline.c:5047:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(gl->cutbuf, gl->line + ca, cb + 1 - ca);
data/libtecla-1.6.3/getline.c:6296:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(expansion->files[0], "r");
data/libtecla-1.6.3/getline.c:6380:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[GL_CONF_BUFLEN+1];  /* The input line buffer */
data/libtecla-1.6.3/getline.c:6381:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *argv[GL_CONF_MAXARG];     /* The argument list */
data/libtecla-1.6.3/getline.c:6546:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char lnum[20];   /* A buffer in which to render a single integer */
data/libtecla-1.6.3/getline.c:6550:3:  [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(lnum, "%d", lineno);
data/libtecla-1.6.3/getline.c:6630:19:  [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).
    gl->file_fp = fopen(result->files[0], "r");
data/libtecla-1.6.3/getline.c:6786:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char s[2]; s[0] = count; s[1] = '\0';
data/libtecla-1.6.3/getline.c:6787:9:  [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).
    n = atoi(s);
data/libtecla-1.6.3/getline.c:7216:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(gl->cutbuf, gl->line + gl->buff_curpos, count);
data/libtecla-1.6.3/getline.c:7239:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(gl->cutbuf, gl->line + gl->buff_curpos, count);
data/libtecla-1.6.3/getline.c:7282:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(gl->cutbuf, gl->line + gl->buff_curpos, gl->ntotal - gl->buff_curpos);
data/libtecla-1.6.3/getline.c:7296:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(gl->cutbuf, gl->line, gl->buff_curpos);
data/libtecla-1.6.3/getline.c:7310:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(gl->cutbuf, gl->line, gl->ntotal);
data/libtecla-1.6.3/getline.c:7641:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(gl->cutbuf, gl->line + gl->buff_curpos, n);
data/libtecla-1.6.3/getline.c:7664:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(gl->cutbuf, gl->line + next, n);
data/libtecla-1.6.3/getline.c:7702: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(gl->cutbuf, gl->line + gl->buff_curpos, n);
data/libtecla-1.6.3/getline.c:7705: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(gl->cutbuf, gl->line + pos, n);
data/libtecla-1.6.3/getline.c:8192:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char keyseq[GL_KEY_MAX+1]; /* A special key sequence being read */
data/libtecla-1.6.3/getline.c:9398: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).
      if((env = getenv("LINES")) && (n=atoi(env)) > 0)
data/libtecla-1.6.3/getline.c:9415:42:  [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).
      if((env = getenv("COLUMNS")) && (n=atoi(env)) > 0)
data/libtecla-1.6.3/getline.c:11592:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(set, &gl->all_signal_set, sizeof(*set));
data/libtecla-1.6.3/history.c:61:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char s[GLH_SEG_SIZE]; /* The sub-string. Beware that only the final */
data/libtecla-1.6.3/history.c:1027:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(filename, "w");
data/libtecla-1.6.3/history.c:1184:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(filename, "r");
data/libtecla-1.6.3/history.c:1273:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char lnum[20];
data/libtecla-1.6.3/history.c:1277:3:  [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(lnum, "%d", lineno);
data/libtecla-1.6.3/history.c:1311:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char timestr[TSLEN+1];   /* The timestamp part of the string */
data/libtecla-1.6.3/history.c:1458:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[TSMAX+1];  /* The buffer in which to write the date and time */
data/libtecla-1.6.3/history.c:1482:3:  [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(buffer, "%lu", (unsigned long) glh->list.tail->id);
data/libtecla-1.6.3/history.c:1495:3:  [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(buffer, "%u", (unsigned) grpmax);
data/libtecla-1.6.3/history.c:1574:6:  [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(buffer, "%*lu", idlen, (unsigned long) node->id);
data/libtecla-1.6.3/history.c:1580:6:  [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(buffer, "%*u", grplen, (unsigned) node->group);
data/libtecla-1.6.3/history.c:2205:7:  [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(seg->s, line + offset, GLH_SEG_SIZE);
data/libtecla-1.6.3/history.c:2206: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(seg->s, line + offset, n-offset);
data/libtecla-1.6.3/homedir.c:357:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[512];          /* The buffer in which the string members of */
data/libtecla-1.6.3/ioutil.c:272:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fill[FILL_SIZE+1];
data/libtecla-1.6.3/pathutil.c:195: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->name + pathlen, string, slen);
data/libtecla-1.6.3/pathutil.c:279: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->name, string, slen);
data/libtecla-1.6.3/pcache.c:160:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char usrnam[USR_LEN+1];/* The buffer used when reading the names of */
data/libtecla-1.6.3/cplfile.c:269:12:  [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).
    slen = strlen(cf->usrnam);
data/libtecla-1.6.3/cplfile.c:361: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).
      nlen = strlen(cf->envnam);
data/libtecla-1.6.3/cplfile.c:373: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).
      vlen = strlen(value);
data/libtecla-1.6.3/cplfile.c:398:41:  [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(_pn_append_to_path(cf->path, value, strlen(value), escaped)==NULL) {
data/libtecla-1.6.3/cplfile.c:527: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).
  args.prefix_len = strlen(prefix);
data/libtecla-1.6.3/cplfile.c:560:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(errmsg, _err_get_msg(cf->err), maxerr);
data/libtecla-1.6.3/cplfile.c:569:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(errmsg, cpl_last_error(cpl), maxerr);
data/libtecla-1.6.3/cplfile.c:617: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).
  int pathlen = strlen(pathname);
data/libtecla-1.6.3/cplfile.c:671: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).
  prefix_len = strlen(prefix);
data/libtecla-1.6.3/cplfile.c:677: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 name_len = strlen(file_name);
data/libtecla-1.6.3/cplfile.c:816: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 suffix_len = strlen(suffix);
data/libtecla-1.6.3/cplmatch.c:325: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).
  string = _sg_alloc_string(cpl->sg, word_end-word_start + strlen(suffix));
data/libtecla-1.6.3/cplmatch.c:334:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(string, line + word_start, word_end - word_start);
data/libtecla-1.6.3/cplmatch.c:471:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(result->suffix, result->matches[0].suffix, length);
data/libtecla-1.6.3/cplmatch.c:533: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).
  line_len = strlen(line);
data/libtecla-1.6.3/cplmatch.c:1045: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).
    int len = strlen(match->completion) + strlen(match->type_suffix);
data/libtecla-1.6.3/cplmatch.c:1045:43:  [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 len = strlen(match->completion) + strlen(match->type_suffix);
data/libtecla-1.6.3/cplmatch.c:1125: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).
      int clen = strlen(match->completion);
data/libtecla-1.6.3/cplmatch.c:1126: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).
      int tlen = strlen(match->type_suffix);
data/libtecla-1.6.3/cplmatch.c:1165:13:  [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 n = strlen(s);
data/libtecla-1.6.3/enhance.c:230:10:  [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(strlen(name)+1 > PTY_MAX_NAME) {
data/libtecla-1.6.3/enhance.c:268:5:  [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(strlen(ext) > PTY_MAX_SUFFIX)
data/libtecla-1.6.3/enhance.c:422: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).
    if(pty_write_to_fd(cntrl, line, strlen(line)))
data/libtecla-1.6.3/enhance.c:561: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).
    int len = strlen(rbuff);
data/libtecla-1.6.3/enhance.c:565:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int nnew = read(fd, rbuff + len, PTY_MAX_READ - len);
data/libtecla-1.6.3/errmsg.c:124:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t slen = strlen(s);
data/libtecla-1.6.3/errmsg.c:131:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(err->msg + msglen, s, nnew);
data/libtecla-1.6.3/expand.c:367:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if(pathlen < 0 || pathlen > strlen(path))
data/libtecla-1.6.3/expand.c:368: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).
    pathlen = strlen(path);
data/libtecla-1.6.3/expand.c:509:13:  [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).
  pathlen = strlen(ef->path->name);
data/libtecla-1.6.3/expand.c:1148:12:  [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).
    plen = strlen(ef->path->name);
data/libtecla-1.6.3/expand.c:1180: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).
    homelen = strlen(homedir);
data/libtecla-1.6.3/expand.c:1327: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).
    int len = strlen(result->files[i]);
data/libtecla-1.6.3/expand.c:1407: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).
      int flen = strlen(file);
data/libtecla-1.6.3/expand.c:1441:13:  [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 n = strlen(s);
data/libtecla-1.6.3/getline.c:3076: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).
  buff_slen = strlen(s);
data/libtecla-1.6.3/getline.c:3310:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nread = read(fd, c, 1);
data/libtecla-1.6.3/getline.c:3849:10:  [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).
    nc = strlen(string);
data/libtecla-1.6.3/getline.c:3899:11:  [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).
      n = strlen(string);
data/libtecla-1.6.3/getline.c:4104:13:  [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).
    nchar = strlen(string);
data/libtecla-1.6.3/getline.c:5528: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).
    suffix_len = strlen(matches->suffix);
data/libtecla-1.6.3/getline.c:5529: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).
    cont_len = strlen(matches->cont_suffix);
data/libtecla-1.6.3/getline.c:5960: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).
      gl->term = (char *) malloc(strlen(term)+1);
data/libtecla-1.6.3/getline.c:6219: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).
  if(_kt_lookup_keybinding(gl->bindings, name, strlen(name), &keysym, &nsym)
data/libtecla-1.6.3/getline.c:6563:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return fgetc((FILE *) stream);
data/libtecla-1.6.3/getline.c:8503: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).
    *sptr = (char *) malloc(strlen(string) + 1);
data/libtecla-1.6.3/getline.c:9986:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t slen = strlen(prompt);
data/libtecla-1.6.3/getline.c:9990: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).
    if(!gl->prompt || slen > strlen(gl->prompt)) {
data/libtecla-1.6.3/getline.c:10422: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).
    int start_len = strlen(start_line);
data/libtecla-1.6.3/getline.c:11533:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buff, msg, n);
data/libtecla-1.6.3/getline.c:11548:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buff, _err_get_msg(gl->err), n);
data/libtecla-1.6.3/hash.c:496:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					  strlen(name) + 1);
data/libtecla-1.6.3/history.c:429:12:  [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).
    slen = strlen(line);
data/libtecla-1.6.3/history.c:544:12:  [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(dim < strlen(line) + 1) {
data/libtecla-1.6.3/history.c:632:12:  [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(dim < strlen(line) + 1) {
data/libtecla-1.6.3/history.c:805:12:  [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(dim < strlen(line) + 1) {
data/libtecla-1.6.3/history.c:878:12:  [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(dim < strlen(line) + 1) {
data/libtecla-1.6.3/history.c:1059: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).
      size_t slen = seg->next ? GLH_SEG_SIZE : strlen(seg->s);
data/libtecla-1.6.3/history.c:1175: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).
  comment_len = strlen(comment);
data/libtecla-1.6.3/history.c:1325:6:  [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(strlen(string) < TSLEN) {
data/libtecla-1.6.3/history.c:1332:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(timestr, string, TSLEN);
data/libtecla-1.6.3/history.c:1483:11:  [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).
  idlen = strlen(buffer);
data/libtecla-1.6.3/history.c:1496:12:  [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).
  grplen = strlen(buffer);
data/libtecla-1.6.3/history.c:1561: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).
	      len = strlen(buffer);
data/libtecla-1.6.3/history.c:1568: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).
	      len = strlen(buffer);
data/libtecla-1.6.3/history.c:1575:12:  [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(buffer);
data/libtecla-1.6.3/history.c:1581:12:  [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(buffer);
data/libtecla-1.6.3/history.c:1587:41:  [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 = seg->next ? GLH_SEG_SIZE : strlen(seg->s);
data/libtecla-1.6.3/history.c:2500: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).
     !_glh_is_line(glh->recall->line, line, strlen(line))) {
data/libtecla-1.6.3/homedir.c:342: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).
  prefix_len = strlen(prefix);
data/libtecla-1.6.3/ioutil.c:135: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).
  prefix_len = prefix ? strlen(prefix) : 0;
data/libtecla-1.6.3/ioutil.c:139: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).
  suffix_len = suffix ? strlen(suffix) : 0;
data/libtecla-1.6.3/pathutil.c:165:13:  [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).
  pathlen = strlen(path->name);
data/libtecla-1.6.3/pathutil.c:169: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).
  if(slen < 0 || slen > strlen(string))
data/libtecla-1.6.3/pathutil.c:170:12:  [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).
    slen = strlen(string);
data/libtecla-1.6.3/pathutil.c:236:13:  [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).
  pathlen = strlen(path->name);
data/libtecla-1.6.3/pathutil.c:240: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).
  if(slen < 0 || slen > strlen(string))
data/libtecla-1.6.3/pathutil.c:241:12:  [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).
    slen = strlen(string);
data/libtecla-1.6.3/pcache.c:586: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).
  if(pca_expand_tilde(pc, path, strlen(path), 0, &pptr))
data/libtecla-1.6.3/pcache.c:613: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).
    int dirlen = strlen(pc->path->name);
data/libtecla-1.6.3/pcache.c:1020:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    name_len = strlen(name);
data/libtecla-1.6.3/pcache.c:1443: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 suffix_len = strlen(suffix);
data/libtecla-1.6.3/stringrp.c:171: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).
  copy = _sg_alloc_string(sg, strlen(string));

ANALYSIS SUMMARY:

Hits = 176
Lines analyzed = 31214 in approximately 0.97 seconds (32235 lines/second)
Physical Source Lines of Code (SLOC) = 12619
Hits@level = [0]  41 [1]  83 [2]  62 [3]   8 [4]  23 [5]   0
Hits@level+ = [0+] 217 [1+] 176 [2+]  93 [3+]  31 [4+]  23 [5+]   0
Hits/KSLOC@level+ = [0+] 17.1963 [1+] 13.9472 [2+] 7.36984 [3+] 2.45661 [4+] 1.82265 [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.