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/tig-2.4.1/compat/ansidecl.h
Examining data/tig-2.4.1/compat/compat.h
Examining data/tig-2.4.1/compat/hashtab.c
Examining data/tig-2.4.1/compat/hashtab.h
Examining data/tig-2.4.1/compat/mkstemps.c
Examining data/tig-2.4.1/compat/setenv.c
Examining data/tig-2.4.1/compat/strndup.c
Examining data/tig-2.4.1/compat/utf8proc.c
Examining data/tig-2.4.1/compat/utf8proc.h
Examining data/tig-2.4.1/compat/utf8proc_data.c
Examining data/tig-2.4.1/compat/wordexp.c
Examining data/tig-2.4.1/include/tig/apps.h
Examining data/tig-2.4.1/include/tig/argv.h
Examining data/tig-2.4.1/include/tig/blame.h
Examining data/tig-2.4.1/include/tig/blob.h
Examining data/tig-2.4.1/include/tig/diff.h
Examining data/tig-2.4.1/include/tig/display.h
Examining data/tig-2.4.1/include/tig/draw.h
Examining data/tig-2.4.1/include/tig/git.h
Examining data/tig-2.4.1/include/tig/graph.h
Examining data/tig-2.4.1/include/tig/grep.h
Examining data/tig-2.4.1/include/tig/help.h
Examining data/tig-2.4.1/include/tig/io.h
Examining data/tig-2.4.1/include/tig/keys.h
Examining data/tig-2.4.1/include/tig/line.h
Examining data/tig-2.4.1/include/tig/log.h
Examining data/tig-2.4.1/include/tig/main.h
Examining data/tig-2.4.1/include/tig/map.h
Examining data/tig-2.4.1/include/tig/options.h
Examining data/tig-2.4.1/include/tig/pager.h
Examining data/tig-2.4.1/include/tig/parse.h
Examining data/tig-2.4.1/include/tig/prompt.h
Examining data/tig-2.4.1/include/tig/refdb.h
Examining data/tig-2.4.1/include/tig/refs.h
Examining data/tig-2.4.1/include/tig/repo.h
Examining data/tig-2.4.1/include/tig/request.h
Examining data/tig-2.4.1/include/tig/search.h
Examining data/tig-2.4.1/include/tig/stage.h
Examining data/tig-2.4.1/include/tig/stash.h
Examining data/tig-2.4.1/include/tig/status.h
Examining data/tig-2.4.1/include/tig/string.h
Examining data/tig-2.4.1/include/tig/tig.h
Examining data/tig-2.4.1/include/tig/tree.h
Examining data/tig-2.4.1/include/tig/types.h
Examining data/tig-2.4.1/include/tig/ui.h
Examining data/tig-2.4.1/include/tig/util.h
Examining data/tig-2.4.1/include/tig/view.h
Examining data/tig-2.4.1/include/tig/watch.h
Examining data/tig-2.4.1/src/apps.c
Examining data/tig-2.4.1/src/argv.c
Examining data/tig-2.4.1/src/blame.c
Examining data/tig-2.4.1/src/blob.c
Examining data/tig-2.4.1/src/diff.c
Examining data/tig-2.4.1/src/display.c
Examining data/tig-2.4.1/src/draw.c
Examining data/tig-2.4.1/src/graph-v1.c
Examining data/tig-2.4.1/src/graph-v2.c
Examining data/tig-2.4.1/src/graph.c
Examining data/tig-2.4.1/src/grep.c
Examining data/tig-2.4.1/src/help.c
Examining data/tig-2.4.1/src/io.c
Examining data/tig-2.4.1/src/keys.c
Examining data/tig-2.4.1/src/line.c
Examining data/tig-2.4.1/src/log.c
Examining data/tig-2.4.1/src/main.c
Examining data/tig-2.4.1/src/map.c
Examining data/tig-2.4.1/src/options.c
Examining data/tig-2.4.1/src/pager.c
Examining data/tig-2.4.1/src/parse.c
Examining data/tig-2.4.1/src/prompt.c
Examining data/tig-2.4.1/src/refdb.c
Examining data/tig-2.4.1/src/refs.c
Examining data/tig-2.4.1/src/repo.c
Examining data/tig-2.4.1/src/request.c
Examining data/tig-2.4.1/src/search.c
Examining data/tig-2.4.1/src/stage.c
Examining data/tig-2.4.1/src/stash.c
Examining data/tig-2.4.1/src/status.c
Examining data/tig-2.4.1/src/string.c
Examining data/tig-2.4.1/src/tig.c
Examining data/tig-2.4.1/src/tree.c
Examining data/tig-2.4.1/src/types.c
Examining data/tig-2.4.1/src/ui.c
Examining data/tig-2.4.1/src/util.c
Examining data/tig-2.4.1/src/view.c
Examining data/tig-2.4.1/src/watch.c
Examining data/tig-2.4.1/test/tools/test-graph.c
Examining data/tig-2.4.1/tools/doc-gen.c
Examining data/tig-2.4.1/tools/header.h

FINAL RESULTS:

data/tig-2.4.1/include/tig/string.h:57:12:  [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.
		retval = vsnprintf(buf, bufsize, fmt, args); \
data/tig-2.4.1/include/tig/tig.h:110:55:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define PRINTF_LIKE(fmt, args) __attribute__((format (printf, fmt, args)))
data/tig-2.4.1/src/diff.c:678:62:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (file && string_format(path, "%s%s", repo.cdup, file) && access(path, R_OK)) {
data/tig-2.4.1/src/graph-v2.c:124: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(node->id, id);
data/tig-2.4.1/src/io.c:181:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (access(query, access_flags))
data/tig-2.4.1/src/io.c:202:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (!access(test, access_flags)) {
data/tig-2.4.1/src/io.c:329:11:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	retval = vfprintf(trace_out, fmt, args);
data/tig-2.4.1/src/io.c:406:3:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execvp(argv[0], (char *const*) argv);
data/tig-2.4.1/src/io.c:722:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	fmtlen = vsnprintf(NULL, 0, fmt, args);
data/tig-2.4.1/src/io.c:726:11:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	retval = vfprintf(file, fmt, args);
data/tig-2.4.1/src/util.c:73:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, msg, args);
data/tig-2.4.1/src/util.c:89:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, err, args);
data/tig-2.4.1/src/view.c:1673:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	fmtlen = vsnprintf(NULL, 0, fmt, args);
data/tig-2.4.1/compat/wordexp.c:35: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 *home = getenv("HOME");
data/tig-2.4.1/src/apps.c:69:25:  [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 *env_path = getenv("PATH");
data/tig-2.4.1/src/apps.c:109:64:  [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.
		} else if (path_search(perl_path, sizeof(perl_path), "perl", getenv("PATH"), X_OK)) {
data/tig-2.4.1/src/display.c:133:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	editor = getenv("GIT_EDITOR");
data/tig-2.4.1/src/display.c:137:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		editor = getenv("VISUAL");
data/tig-2.4.1/src/display.c:139:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		editor = getenv("EDITOR");
data/tig-2.4.1/src/display.c:617:22:  [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.
	bool no_display = !!getenv("TIG_NO_DISPLAY");
data/tig-2.4.1/src/display.c:664:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	term = getenv("XTERM_VERSION")
data/tig-2.4.1/src/display.c:666:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		   : (getenv("TERM_PROGRAM") ? getenv("TERM_PROGRAM") : getenv("COLORTERM"));
data/tig-2.4.1/src/display.c:666:34:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		   : (getenv("TERM_PROGRAM") ? getenv("TERM_PROGRAM") : getenv("COLORTERM"));
data/tig-2.4.1/src/display.c:666:59:  [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.
		   : (getenv("TERM_PROGRAM") ? getenv("TERM_PROGRAM") : getenv("COLORTERM"));
data/tig-2.4.1/src/io.c:146: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 *ifs = getenv("IFS") ? getenv("IFS") : " \t\n";
data/tig-2.4.1/src/io.c:146:37:  [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 *ifs = getenv("IFS") ? getenv("IFS") : " \t\n";
data/tig-2.4.1/src/io.c:284: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.
		trace_file = getenv("TIG_TRACE");
data/tig-2.4.1/src/io.c:320:28:  [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 *trace_file = getenv("TIG_TRACE");
data/tig-2.4.1/src/io.c:741:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		tmp = getenv("TMPDIR");
data/tig-2.4.1/src/io.c:743:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		tmp = getenv("TEMP");
data/tig-2.4.1/src/io.c:745:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		tmp = getenv("TMP");
data/tig-2.4.1/src/options.c:1014:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *tigrc_user = getenv("TIGRC_USER");
data/tig-2.4.1/src/options.c:1015:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *tigrc_system = getenv("TIGRC_SYSTEM");
data/tig-2.4.1/src/options.c:1016:30:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *tig_diff_opts = getenv("TIG_DIFF_OPTS");
data/tig-2.4.1/src/options.c:1042:33:  [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 *xdg_config_home = getenv("XDG_CONFIG_HOME");
data/tig-2.4.1/src/prompt.c:526:30:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *xdg_data_home = getenv("XDG_DATA_HOME");
data/tig-2.4.1/src/prompt.c:527: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 *home = getenv("HOME");
data/tig-2.4.1/src/refdb.c:321:20:  [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 *env = getenv("TIG_LS_REMOTE");
data/tig-2.4.1/src/tig.c:755: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.
	const char *prefix = getenv("GIT_PREFIX");
data/tig-2.4.1/src/tig.c:834:6:  [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("TIG_SCRIPT")) {
data/tig-2.4.1/src/tig.c:835:46:  [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 *script_command[] = { "script", getenv("TIG_SCRIPT"), NULL };
data/tig-2.4.1/src/util.c:108: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.
		if ((time = getenv("TEST_TIME_NOW"))) {
data/tig-2.4.1/compat/mkstemps.c:131: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).
      fd = open (pattern, O_BINARY|O_RDWR|O_CREAT|O_EXCL, 0600);
data/tig-2.4.1/compat/setenv.c:129:2:  [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 ((char *) new_environ, (char *) __environ,
data/tig-2.4.1/compat/setenv.c:132: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 (new_environ[size], name, namelen);
data/tig-2.4.1/compat/setenv.c:134: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 (&new_environ[size][namelen + 1], value, vallen);
data/tig-2.4.1/compat/setenv.c:154: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 (*ep, name, namelen);
data/tig-2.4.1/compat/setenv.c:156: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 (&(*ep)[namelen + 1], value, vallen);
data/tig-2.4.1/compat/strndup.c:53:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  return (char *) memcpy (result, s, len);
data/tig-2.4.1/include/tig/apps.h:26: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.
	const char *argv[SIZEOF_ARG];
data/tig-2.4.1/include/tig/apps.h:27:2:  [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 * const env[SIZEOF_ARG];
data/tig-2.4.1/include/tig/argv.h:28:34:  [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.
bool argv_to_string_quoted(const char *argv[SIZEOF_ARG], char *buf, size_t buflen, const char *sep);
data/tig-2.4.1/include/tig/argv.h:29:39:  [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.
bool argv_from_string_no_quotes(const char *argv[SIZEOF_ARG], int *argc, char *cmd);
data/tig-2.4.1/include/tig/argv.h:30:29:  [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.
bool argv_from_string(const char *argv[SIZEOF_ARG], int *argc, char *cmd);
data/tig-2.4.1/include/tig/argv.h:39:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef char argv_string[SIZEOF_STR];
data/tig-2.4.1/include/tig/argv.h:62:2:  [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 search[SIZEOF_STR];
data/tig-2.4.1/include/tig/argv.h:63:2:  [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 none[1];
data/tig-2.4.1/include/tig/keys.h:37: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[7];
data/tig-2.4.1/include/tig/main.h:22:2:  [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 id[SIZEOF_REV];		/* SHA1 ID. */
data/tig-2.4.1/include/tig/main.h:26:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char title[1];			/* First line of the commit message. */
data/tig-2.4.1/include/tig/main.h:35:2:  [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 reflogmsg[SIZEOF_STR / 2];
data/tig-2.4.1/include/tig/options.h:179: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.
extern char opt_editor[SIZEOF_STR];
data/tig-2.4.1/include/tig/parse.h:34:2:  [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 id[SIZEOF_REV];		/* SHA1 ID. */
data/tig-2.4.1/include/tig/parse.h:35:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char title[128];		/* First line of the commit message. */
data/tig-2.4.1/include/tig/parse.h:39:2:  [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 parent_id[SIZEOF_REV];	/* Parent/previous SHA1 ID. */
data/tig-2.4.1/include/tig/parse.h:44:2:  [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 id[SIZEOF_REV];		/* SHA1 ID. */
data/tig-2.4.1/include/tig/parse.h:51:52:  [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.
bool parse_blame_info(struct blame_commit *commit, char author[SIZEOF_STR], char *line);
data/tig-2.4.1/include/tig/prompt.h:43:2:  [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[SIZEOF_STR];
data/tig-2.4.1/include/tig/prompt.h:44:2:  [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 context[SIZEOF_STR];
data/tig-2.4.1/include/tig/refdb.h:26:2:  [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 id[SIZEOF_REV];	/* Commit SHA1 ID */
data/tig-2.4.1/include/tig/refdb.h:28:2:  [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[1];		/* Ref name; tag or head names are shortened. */
data/tig-2.4.1/include/tig/repo.h:19:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef char repo_ref[SIZEOF_REF];
data/tig-2.4.1/include/tig/repo.h:20:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef char repo_rev[SIZEOF_REV];
data/tig-2.4.1/include/tig/repo.h:21:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef char repo_str[SIZEOF_STR];
data/tig-2.4.1/include/tig/status.h:24: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 rev[SIZEOF_REV];
data/tig-2.4.1/include/tig/status.h:25:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char name[SIZEOF_STR];
data/tig-2.4.1/include/tig/status.h:29: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 rev[SIZEOF_REV];
data/tig-2.4.1/include/tig/status.h:30:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char name[SIZEOF_STR];
data/tig-2.4.1/include/tig/view.h:108:2:  [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 ref[SIZEOF_REF];	/* Hovered commit reference */
data/tig-2.4.1/include/tig/view.h:109:2:  [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 vid[SIZEOF_REF];	/* View ID. Set to id member when updating. */
data/tig-2.4.1/include/tig/view.h:126:2:  [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 grep[SIZEOF_STR];	/* Search string */
data/tig-2.4.1/include/tig/view.h:221:21:  [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).
	enum status_code (*open)(struct view *view, enum open_flags flags);
data/tig-2.4.1/src/apps.c:37:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char exec_path[SIZEOF_STR] = "";
data/tig-2.4.1/src/apps.c:70:2:  [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 env_path_plus[SIZEOF_MED_STR];
data/tig-2.4.1/src/apps.c:71:2:  [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 exec_path[SIZEOF_STR];
data/tig-2.4.1/src/apps.c:99:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char dhlt_path[SIZEOF_STR];
data/tig-2.4.1/src/apps.c:100:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char perl_path[SIZEOF_STR];
data/tig-2.4.1/src/apps.c:101:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char perl_include[SIZEOF_STR];
data/tig-2.4.1/src/argv.c:75:29:  [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.
argv_to_string_quoted(const char *argv[SIZEOF_ARG], char *buf, size_t buflen, const char *sep)
data/tig-2.4.1/src/argv.c:81:22:  [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.
argv_to_string(const char *argv[SIZEOF_ARG], char *buf, size_t buflen, const char *sep)
data/tig-2.4.1/src/argv.c:147:25:  [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.
split_argv_string(const char *argv[SIZEOF_ARG], int *argc, char *cmd, bool remove_quotes)
data/tig-2.4.1/src/argv.c:164:34:  [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.
argv_from_string_no_quotes(const char *argv[SIZEOF_ARG], int *argc, char *cmd)
data/tig-2.4.1/src/argv.c:170:24:  [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.
argv_from_string(const char *argv[SIZEOF_ARG], int *argc, char *cmd)
data/tig-2.4.1/src/argv.c:278:2:  [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[SIZEOF_MED_STR];
data/tig-2.4.1/src/argv.c:297: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 msgbuf[SIZEOF_STR];
data/tig-2.4.1/src/argv.c:608:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		dst_arg = (char *) dst_argv[0];
data/tig-2.4.1/src/blame.c:37:2:  [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 id[SIZEOF_REV];		/* SHA1 ID. */
data/tig-2.4.1/src/blame.c:46:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char text[1];
data/tig-2.4.1/src/blame.c:51:2:  [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 author[SIZEOF_STR];
data/tig-2.4.1/src/blame.c:81:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/blame.c:356:2:  [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[SIZEOF_REF + SIZEOF_STR];
data/tig-2.4.1/src/blame.c:357:2:  [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 to[SIZEOF_REF + SIZEOF_STR];
data/tig-2.4.1/src/blame.c:378:20:  [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).
			parent_lineno = atoi(line + 4);
data/tig-2.4.1/src/blame.c:380:21:  [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).
				blamed_lineno = atoi(pos + 1);
data/tig-2.4.1/src/blob.c:25:2:  [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 commit[SIZEOF_REF];
data/tig-2.4.1/src/blob.c:68: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 blob_spec[SIZEOF_STR];
data/tig-2.4.1/src/diff.c:122: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(box->cell, context->cell, sizeof(struct box_cell) * context->cells);
data/tig-2.4.1/src/diff.c:484:2:  [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 author[SIZEOF_STR] = "";
data/tig-2.4.1/src/diff.c:485:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line_arg[SIZEOF_STR];
data/tig-2.4.1/src/diff.c:558:2:  [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 ref[SIZEOF_REF];
data/tig-2.4.1/src/diff.c:667:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/display.c:55:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/display.c:70: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 buf[SIZEOF_STR] = "";
data/tig-2.4.1/src/display.c:127: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.
	const char *editor_argv[SIZEOF_ARG + 3] = { "vi", file, NULL };
data/tig-2.4.1/src/display.c:128:2:  [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 editor_cmd[SIZEOF_STR];
data/tig-2.4.1/src/display.c:129:2:  [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 lineno_cmd[SIZEOF_STR];
data/tig-2.4.1/src/display.c:343:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *file = fopen(path, "w");
data/tig-2.4.1/src/display.c:391:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *file = fopen(path, "w");
data/tig-2.4.1/src/display.c:527: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 buf[SIZEOF_STR];
data/tig-2.4.1/src/display.c:595:17:  [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).
	opt_tty.file = fopen("/dev/tty", "r+");
data/tig-2.4.1/src/display.c:636:26:  [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).
		out_tty = no_display ? fopen("/dev/null", "w+") : opt_tty.file;
data/tig-2.4.1/src/draw.c:108:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char text[SIZEOF_STR];
data/tig-2.4.1/src/draw.c:169:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char text[SIZEOF_STR];
data/tig-2.4.1/src/draw.c:310:2:  [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 number[10];
data/tig-2.4.1/src/graph-v1.c:35:2:  [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 id[SIZEOF_REV];		/* Parent SHA1 ID. */
data/tig-2.4.1/src/graph-v2.c:780: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 parent[SIZEOF_REV] = {0};
data/tig-2.4.1/src/grep.c:27:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char text[1];
data/tig-2.4.1/src/grep.c:98: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.
	const char *argv[SIZEOF_ARG];
data/tig-2.4.1/src/grep.c:249:17:  [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).
	grep->lineno = atoi(lineno);
data/tig-2.4.1/src/help.c:101: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 buf[SIZEOF_STR] = "";
data/tig-2.4.1/src/io.c:30:2:  [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 fromcode[1];
data/tig-2.4.1/src/io.c:68:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char out_buffer[BUFSIZ * 2];
data/tig-2.4.1/src/io.c:107:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/io.c:149: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 metachars[SIZEOF_STR];
data/tig-2.4.1/src/io.c:150: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 leading[SIZEOF_STR];
data/tig-2.4.1/src/io.c:173:2:  [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 test[SIZEOF_STR];
data/tig-2.4.1/src/io.c:174:2:  [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 elt[SIZEOF_STR];
data/tig-2.4.1/src/io.c:224:2:  [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[SIZEOF_STR] = "";
data/tig-2.4.1/src/io.c:235:21:  [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).
	io->pipe = *name ? open(name, O_RDONLY) : dup(STDIN_FILENO);
data/tig-2.4.1/src/io.c:290: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).
		int fd = open(trace_file, O_RDWR | O_CREAT | O_APPEND, 0666);
data/tig-2.4.1/src/io.c:323: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).
			trace_out = fopen(trace_file, "a");
data/tig-2.4.1/src/io.c:367:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			int devnull = open("/dev/null", O_RDWR);
data/tig-2.4.1/src/io.c:603:2:  [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[SIZEOF_STR] = "";
data/tig-2.4.1/src/keys.c:102:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/keys.c:128:2:  [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(keybinding->key, key, sizeof(*key) * keys);
data/tig-2.4.1/src/keys.c:345:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[SIZEOF_STR];
data/tig-2.4.1/src/keys.c:422:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[BUFSIZ];
data/tig-2.4.1/src/keys.c:522:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char flags[8];
data/tig-2.4.1/src/main.c:79:2:  [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[SIZEOF_STR / 2];
data/tig-2.4.1/src/main.c:111:2:  [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 ids[SIZEOF_STR] = NULL_ID " ";
data/tig-2.4.1/src/options.c:42:2:  [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 prefixed[SIZEOF_STR];
data/tig-2.4.1/src/options.c:123:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char opt_editor[SIZEOF_STR]	= "";
data/tig-2.4.1/src/options.c:133:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char opt_diff_context_arg[9]	= "";
data/tig-2.4.1/src/options.c:202: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 opt_notes_arg[SIZEOF_STR] = NOTES_ARG;
data/tig-2.4.1/src/options.c:294:14:  [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).
	int value = atoi(arg);
data/tig-2.4.1/src/options.c:319:14:  [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).
	int value = atoi(arg);
data/tig-2.4.1/src/options.c:535:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/options.c:562:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/options.c:672:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/options.c:956:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		const char *argv[SIZEOF_ARG];
data/tig-2.4.1/src/options.c:985:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/options.c:1019:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/options.c:1056:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		static const char *diff_opts[SIZEOF_ARG] = { NULL };
data/tig-2.4.1/src/options.c:1057: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 buf[SIZEOF_STR];
data/tig-2.4.1/src/options.c:1159:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/options.c:1285: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).
	int fd = open(path, O_WRONLY | O_CREAT | O_EXCL, 0666);
data/tig-2.4.1/src/options.c:1326: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.
	const char *argv[SIZEOF_ARG] = { name, "=" };
data/tig-2.4.1/src/options.c:1342: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.
	const char *argv[SIZEOF_ARG];
data/tig-2.4.1/src/options.c:1459:24:  [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).
			opt_diff_context = -atoi(value);
data/tig-2.4.1/src/pager.c:39:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/parse.c:39:23:  [2] (integer) atol:
  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).
	time->sec = (time_t) atol(sec);
data/tig-2.4.1/src/parse.c:103: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).
	*number = atoi(pos + 1);
data/tig-2.4.1/src/parse.c:142:47:  [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.
parse_blame_info(struct blame_commit *commit, char author[SIZEOF_STR], char *line)
data/tig-2.4.1/src/parse.c:246:2:  [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[1];
data/tig-2.4.1/src/parse.c:277:2:  [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 key[SIZEOF_STR + SIZEOF_STR];
data/tig-2.4.1/src/prompt.c:33:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char chars_length[SIZEOF_STR];
data/tig-2.4.1/src/prompt.c:158:2:  [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 prompt2[SIZEOF_STR];
data/tig-2.4.1/src/prompt.c:360: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 buf[SIZEOF_STR]; \
data/tig-2.4.1/src/prompt.c:525:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char path[SIZEOF_STR] = "";
data/tig-2.4.1/src/prompt.c:536:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_RDWR | O_CREAT | O_APPEND, 0666);
data/tig-2.4.1/src/prompt.c:630:2:  [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[128];
data/tig-2.4.1/src/prompt.c:715:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/prompt.c:740:14:  [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).
		int diff = atoi(arg);
data/tig-2.4.1/src/prompt.c:911: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 search[SIZEOF_STR];
data/tig-2.4.1/src/prompt.c:954: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 text[SIZEOF_STR] = "";
data/tig-2.4.1/src/prompt.c:1084:2:  [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 cmd[SIZEOF_MED_STR];
data/tig-2.4.1/src/prompt.c:1085: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.
	const char *req_argv[SIZEOF_ARG];
data/tig-2.4.1/src/prompt.c:1103:4:  [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 cmd[SIZEOF_STR], prompt[SIZEOF_STR];
data/tig-2.4.1/src/prompt.c:1141: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.
	const char *argv[SIZEOF_ARG] = { NULL };
data/tig-2.4.1/src/refdb.c:314: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.
	const char *ls_remote_argv[SIZEOF_ARG] = {
data/tig-2.4.1/src/refdb.c:317:2:  [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 ls_remote_cmd[SIZEOF_STR];
data/tig-2.4.1/src/refdb.c:495:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/refs.c:30:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char title[128];		/* First line of the commit message. */
data/tig-2.4.1/src/search.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 buf[SIZEOF_STR] = "unknown error";
data/tig-2.4.1/src/stage.c:133: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.
	const char *apply_argv[SIZEOF_ARG] = {
data/tig-2.4.1/src/status.c:33: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 status_onbranch[SIZEOF_STR];
data/tig-2.4.1/src/status.c:280:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/status.c:569:2:  [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[sizeof(view->ref)];
data/tig-2.4.1/src/status.c:644: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 mode[10] = "100644";
data/tig-2.4.1/src/status.c:784:2:  [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 file[SIZEOF_STR] = "all files";
data/tig-2.4.1/src/string.c:119:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(dst + size, "        ", expanded);
data/tig-2.4.1/src/string.c:191:23:  [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).
	num1 = number * 10 + atoi(s1);
data/tig-2.4.1/src/string.c:192:23:  [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).
	num2 = number * 10 + atoi(s2);
data/tig-2.4.1/src/string.c:232: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_bytes[256] = {
data/tig-2.4.1/src/tig.c:403: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.
	const char *rev_parse_argv[SIZEOF_ARG] = { "git", "rev-parse", arg1, arg2 };
data/tig-2.4.1/src/tig.c:536:18:  [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).
				int lineno = atoi(opt + 1);
data/tig-2.4.1/src/tig.c:756:2:  [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[4096];
data/tig-2.4.1/src/tig.c:817: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 translit[SIZEOF_STR];
data/tig-2.4.1/src/tree.c:71:2:  [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 id[SIZEOF_REV];
data/tig-2.4.1/src/tree.c:72:2:  [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 commit[SIZEOF_REV];
data/tig-2.4.1/src/tree.c:77:2:  [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[1];
data/tig-2.4.1/src/tree.c:81:2:  [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 commit[SIZEOF_REV];
data/tig-2.4.1/src/tree.c:305:2:  [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 file[SIZEOF_STR];
data/tig-2.4.1/src/types.c:59:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[SIZEOF_STR];
data/tig-2.4.1/src/types.c:67:2:  [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 prefixed[SIZEOF_STR];
data/tig-2.4.1/src/ui.c:24:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char text[1];
data/tig-2.4.1/src/util.c:27: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 status_custom_message[SIZEOF_STR];
data/tig-2.4.1/src/util.c:112:22:  [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).
			timeval->tv_sec = atoi(time);
data/tig-2.4.1/src/util.c:183:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[SIZEOF_STR];
data/tig-2.4.1/src/util.c:215: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 format_buf[SIZEOF_STR];
data/tig-2.4.1/src/util.c:268:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[64 + 1];
data/tig-2.4.1/src/util.c:318:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char initials[256];
data/tig-2.4.1/src/util.c:361:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char user[SIZEOF_STR + 1];
data/tig-2.4.1/src/view.c:305:2:  [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 id[SIZEOF_STR] = "";
data/tig-2.4.1/src/view.c:385: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(state->data, data, history->state_alloc);
data/tig-2.4.1/src/view.c:401: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(data, state->data, history->state_alloc);
data/tig-2.4.1/src/view.c:507:2:  [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 opt_env_lines[64] = "";
data/tig-2.4.1/src/view.c:508:2:  [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 opt_env_columns[64] = "";
data/tig-2.4.1/src/view.c:773:21:  [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).
		code = view->ops->open(view, flags);
data/tig-2.4.1/src/view.c:1193:2:  [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[SIZEOF_STR] = "";
data/tig-2.4.1/src/view.c:1322:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/view.c:1323:2:  [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 value[SIZEOF_STR];
data/tig-2.4.1/src/view.c:1397:2:  [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 type[SIZEOF_STR];
data/tig-2.4.1/src/view.c:1398:2:  [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 value[SIZEOF_STR];
data/tig-2.4.1/src/view.c:1568:4:  [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(alloc_data, data, data_size);
data/tig-2.4.1/src/view.c:1656:2:  [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[SIZEOF_STR];
data/tig-2.4.1/src/watch.c:63:2:  [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[SIZEOF_STR];
data/tig-2.4.1/test/tools/test-graph.c:27:2:  [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 id[SIZEOF_REV];
data/tig-2.4.1/compat/mkstemps.c:95: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).
  len = strlen (pattern);
data/tig-2.4.1/compat/setenv.c:88: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).
  const size_t namelen = strlen (name);
data/tig-2.4.1/compat/setenv.c:89:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const size_t vallen = strlen (value) + 1;
data/tig-2.4.1/compat/setenv.c:142:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t len = strlen (*ep);
data/tig-2.4.1/compat/setenv.c:168: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).
  const size_t len = strlen (name);
data/tig-2.4.1/compat/strndup.c:43: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).
  size_t len = strlen (s);
data/tig-2.4.1/compat/utf8proc.c:114: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).
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen, utf8proc_int32_t *dst
data/tig-2.4.1/compat/utf8proc.c:120: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).
  if (!strlen) return 0;
data/tig-2.4.1/compat/utf8proc.c:121: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).
  end = str + ((strlen < 0) ? 4 : strlen);
data/tig-2.4.1/compat/utf8proc.c:121:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  end = str + ((strlen < 0) ? 4 : strlen);
data/tig-2.4.1/compat/utf8proc.c:486: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).
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen,
data/tig-2.4.1/compat/utf8proc.c:489: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).
    return utf8proc_decompose_custom(str, strlen, buffer, bufsize, options, NULL, NULL);
data/tig-2.4.1/compat/utf8proc.c:493: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).
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen,
data/tig-2.4.1/compat/utf8proc.c:518: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).
        if (rpos >= strlen) break;
data/tig-2.4.1/compat/utf8proc.c:696: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).
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen, utf8proc_uint8_t **dstptr, utf8proc_option_t options
data/tig-2.4.1/compat/utf8proc.c:698: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).
    return utf8proc_map_custom(str, strlen, dstptr, options, NULL, NULL);
data/tig-2.4.1/compat/utf8proc.c:702: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).
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen, utf8proc_uint8_t **dstptr, utf8proc_option_t options,
data/tig-2.4.1/compat/utf8proc.c:708: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).
  result = utf8proc_decompose_custom(str, strlen, NULL, 0, options, custom_func, custom_data);
data/tig-2.4.1/compat/utf8proc.c:712: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).
  result = utf8proc_decompose_custom(str, strlen, buffer, result, options, custom_func, custom_data);
data/tig-2.4.1/compat/utf8proc.h:427:100:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_iterate(const utf8proc_uint8_t *str, utf8proc_ssize_t strlen, utf8proc_int32_t *codepoint_ref);
data/tig-2.4.1/compat/utf8proc.h:513: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).
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen,
data/tig-2.4.1/compat/utf8proc.h:524: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).
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen,
data/tig-2.4.1/compat/utf8proc.h:672: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).
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen, utf8proc_uint8_t **dstptr, utf8proc_option_t options
data/tig-2.4.1/compat/utf8proc.h:682: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).
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen, utf8proc_uint8_t **dstptr, utf8proc_option_t options,
data/tig-2.4.1/compat/wordexp.c:38: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).
		size_t len = strlen(home) + strlen(words + 1) + 1;
data/tig-2.4.1/compat/wordexp.c:38: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).
		size_t len = strlen(home) + strlen(words + 1) + 1;
data/tig-2.4.1/include/tig/keys.h:55: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).
		? utf8_to_unicode(key->data.bytes, strlen(key->data.bytes))
data/tig-2.4.1/include/tig/keys.h:62:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return (key->modifiers.control && key->modifiers.multibytes && strlen(key->data.bytes) == 1)
data/tig-2.4.1/include/tig/view.h:223:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bool (*read)(struct view *view, struct buffer *buf, bool force_stop);
data/tig-2.4.1/src/apps.c:65: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).
		string_ncopy_do(dest, destlen, query, strlen(query));
data/tig-2.4.1/src/apps.c:84: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).
		string_ncopy(env_path_plus, env_path, strlen(env_path));
data/tig-2.4.1/src/apps.c:106:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (suffixcmp(dhlt_path, strlen(dhlt_path), "/diff-highlight.perl")) {
data/tig-2.4.1/src/argv.c:65: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).
		size += strlen(argv[i]);
data/tig-2.4.1/src/argv.c:235:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return argv_appendn(argv, arg, strlen(arg));
data/tig-2.4.1/src/argv.c:340:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		const int len = var ? var - arg : strlen(arg);
data/tig-2.4.1/src/argv.c:485:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t flaglen = strlen(flag);
data/tig-2.4.1/src/argv.c:580:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t arglen = strlen(arg);
data/tig-2.4.1/src/blame.c:89: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).
		string_ncopy(view->env->file, opt_file_args[0], strlen(opt_file_args[0]));
data/tig-2.4.1/src/blame.c:112:40:  [1] (buffer) strlen:
  Does not handle 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_ncopy(view->env->ref, arg, strlen(arg));
data/tig-2.4.1/src/blame.c:262:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(blame->text, buf->data, buf->size);
data/tig-2.4.1/src/blame.c:420: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).
	string_ncopy(view->env->file, filename, strlen(filename));
data/tig-2.4.1/src/blame.c:438: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).
	string_ncopy(view->env->file, history_state.filename, strlen(history_state.filename));
data/tig-2.4.1/src/blob.c:44:40:  [1] (buffer) strlen:
  Does not handle 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_ncopy(view->env->file, file, strlen(file));
data/tig-2.4.1/src/blob.c:77: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).
		string_ncopy(state->commit, commit, strlen(commit));
data/tig-2.4.1/src/blob.c:128: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).
			string_ncopy(view->env->file, state->file, strlen(state->file));
data/tig-2.4.1/src/blob.c:134: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).
		string_ncopy(view->env->ref, state->commit, strlen(state->commit));
data/tig-2.4.1/src/diff.c:138: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).
	context->text = sep + (context->skip ? strlen(s) : 0);
data/tig-2.4.1/src/diff.c:176: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).
	diff_common_add_cell(&context, strlen(context.text), false);
data/tig-2.4.1/src/diff.c:186: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).
	size_t len = strlen(data);
data/tig-2.4.1/src/diff.c:226: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).
	diff_common_add_cell(&context, strlen(context.text), true);
data/tig-2.4.1/src/diff.c:263: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 (!strncmp(data + len, "combined ", strlen("combined ")) ||
data/tig-2.4.1/src/diff.c:264:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    !strncmp(data + len, "cc ", strlen("cc ")))
data/tig-2.4.1/src/diff.c:279: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).
		box->cell[1].length = strlen(context + 2);
data/tig-2.4.1/src/diff.c:609: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).
		string_ncopy(view->env->file, file, strlen(file));
data/tig-2.4.1/src/diff.c:619: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).
		string_ncopy(view->env->file, commit.filename, strlen(commit.filename));
data/tig-2.4.1/src/diff.c:643: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).
			return dst + strlen(prefixes[i]);
data/tig-2.4.1/src/diff.c:739: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).
			string_ncopy(view->ref, view->ops->id, strlen(view->ops->id));
data/tig-2.4.1/src/display.c:95:5:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				getc(opt_tty.file);
data/tig-2.4.1/src/display.c:143:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	string_ncopy(editor_cmd, editor, strlen(editor));
data/tig-2.4.1/src/display.c:320: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).
	return read == ERR ? false : fprintf(file, "%s\n", out) == strlen(out) + 1;
data/tig-2.4.1/src/display.c:334: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).
	return fprintf(file, "%s\n", string_trim_end(buf)) == strlen(buf) + 1;
data/tig-2.4.1/src/display.c:482: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).
			size_t contextlen = strlen(context);
data/tig-2.4.1/src/display.c:730: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).
		if (!key.modifiers.multibytes || bytes_pos >= strlen(key.data.bytes)) {
data/tig-2.4.1/src/display.c:745:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return getc(opt_tty.file);
data/tig-2.4.1/src/draw.c:111: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).
		length = strlen(string);
data/tig-2.4.1/src/graph-v2.c:123: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).
	node->id = (char *) malloc(strlen(id) + 1);
data/tig-2.4.1/src/grep.c:84: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).
	string_ncopy(view->env->file, grep->file, strlen(grep->file));
data/tig-2.4.1/src/grep.c:85: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).
	string_ncopy(view->ref, grep->file, strlen(grep->file));
data/tig-2.4.1/src/grep.c:234: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).
	textlen = strlen(text);
data/tig-2.4.1/src/grep.c:252:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(grep->text, text, textlen + 1);
data/tig-2.4.1/src/help.c:164: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).
	state->keys_width = MAX(state->keys_width, strlen(key));
data/tig-2.4.1/src/help.c:168:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		state->name_width = MAX(state->name_width, strlen(enum_name(req_info->name)));
data/tig-2.4.1/src/io.c:41: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).
	size_t len = strlen(fromcode);
data/tig-2.4.1/src/io.c:52:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(encoding->fromcode, fromcode, len);
data/tig-2.4.1/src/io.c:165: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).
	string_ncopy_do(dst, dstlen, src, strlen(src));
data/tig-2.4.1/src/io.c:183: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).
		string_ncopy_do(dst, dstlen, query, strlen(query));
data/tig-2.4.1/src/io.c:203: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).
			string_ncopy_do(dst, dstlen, test, strlen(test));
data/tig-2.4.1/src/io.c:295:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (write(fd, argv[i], strlen(argv[i])) == -1
data/tig-2.4.1/src/io.c:483:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ssize_t readsize = read(io->pipe, buf, bufsize);
data/tig-2.4.1/src/io.c:622:46:  [1] (buffer) strlen:
  Does not handle 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_ncopy_do(buf, bufsize, result.data, strlen(result.data));
data/tig-2.4.1/src/io.c:639: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).
	size_t len = strlen(str);
data/tig-2.4.1/src/io.c:649:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(io->buf, str, len);
data/tig-2.4.1/src/io.c:673: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).
			valuelen = strlen(value);
data/tig-2.4.1/src/keys.c:68:7:  [1] (buffer) strlen:
  Does not handle 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(key1->data.bytes) == 1 &&
data/tig-2.4.1/src/keys.c:69:7:  [1] (buffer) strlen:
  Does not handle 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(key2->data.bytes) == 1) {
data/tig-2.4.1/src/keys.c:116: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).
			string_ncopy(buf, old_name, strlen(old_name));
data/tig-2.4.1/src/keys.c:256: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 (namelen == strlen(key_mappings[i].name) &&
data/tig-2.4.1/src/keys.c:272: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(name) < namelen || utf8_to_unicode(name, namelen) == 0)
data/tig-2.4.1/src/keys.c:275:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(key->data.bytes, name, namelen);
data/tig-2.4.1/src/line.c:32: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).
	int linelen = strlen(line);
data/tig-2.4.1/src/log.c:113: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).
	len = strlen(data + state->graph_indent);
data/tig-2.4.1/src/main.c:84: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).
	string_expand(buf, sizeof(buf), title, strlen(title), 1);
data/tig-2.4.1/src/main.c:86: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).
	titlelen = strlen(title);
data/tig-2.4.1/src/main.c:93:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(commit->title, title, titlelen);
data/tig-2.4.1/src/main.c:229: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).
			string_ncopy(view->env->search, arg, strlen(arg));
data/tig-2.4.1/src/main.c:369: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).
	id_width = strlen(reflog);
data/tig-2.4.1/src/main.c:465:40:  [1] (buffer) strlen:
  Does not handle 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_ncopy(state->reflogmsg, line, strlen(line));
data/tig-2.4.1/src/main.c:562: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).
		string_ncopy(view->ref, commit->title, strlen(commit->title));
data/tig-2.4.1/src/options.c:41: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 namelen = strlen(name);
data/tig-2.4.1/src/options.c:45:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (*prefix && namelen == strlen(prefix) &&
data/tig-2.4.1/src/options.c:48: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).
		namelen = strlen(name);
data/tig-2.4.1/src/options.c:60: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).
		    namelen == strlen(prefixed) &&
data/tig-2.4.1/src/options.c:243: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).
			string_ncopy(opt_notes_arg, flag, strlen(flag));
data/tig-2.4.1/src/options.c:362: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).
		rule->linelen = strlen(color) - 2;
data/tig-2.4.1/src/options.c:365: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).
		rule->namelen = strlen(color);
data/tig-2.4.1/src/options.c:374:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t arglen = strlen(arg);
data/tig-2.4.1/src/options.c:379:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t namelen = strlen(name);
data/tig-2.4.1/src/options.c:517: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 arglen = strlen(arg);
data/tig-2.4.1/src/options.c:638:7:  [1] (buffer) strlen:
  Does not handle 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(arg)) {
data/tig-2.4.1/src/options.c:639: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).
			if (arg[0] == '"' && arg[strlen(arg) - 1] == '"')
data/tig-2.4.1/src/options.c:640: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).
				alloc = strndup(arg + 1, strlen(arg + 1) - 1);
data/tig-2.4.1/src/options.c:678:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t column_namelen = strlen(column_name);
data/tig-2.4.1/src/options.c:803: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 (!(keymap = get_keymap(argv[0], strlen(argv[0])))) {
data/tig-2.4.1/src/options.c:805: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).
			keymap = get_keymap("refs", strlen("refs"));
data/tig-2.4.1/src/options.c:988: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 (!path || !strlen(path))
data/tig-2.4.1/src/options.c:1173: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).
		if (!suffixcmp(name, strlen(name), "-args"))
data/tig-2.4.1/src/options.c:1259: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_width = strlen(prefix) + strlen(prefix_sep) + 2 * strlen(quote) + strlen(name);
data/tig-2.4.1/src/options.c:1259: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).
		int name_width = strlen(prefix) + strlen(prefix_sep) + 2 * strlen(quote) + strlen(name);
data/tig-2.4.1/src/options.c:1259:62:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int name_width = strlen(prefix) + strlen(prefix_sep) + 2 * strlen(quote) + strlen(name);
data/tig-2.4.1/src/options.c:1259: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).
		int name_width = strlen(prefix) + strlen(prefix_sep) + 2 * strlen(quote) + strlen(name);
data/tig-2.4.1/src/options.c:1313:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t from = strlen(repo.remote);
data/tig-2.4.1/src/options.c:1376: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 namelen = strlen(name);
data/tig-2.4.1/src/options.c:1454: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).
		 !strncmp(name + 7, repo.head, strlen(repo.head)))
data/tig-2.4.1/src/options.c:1455: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).
		set_remote_branch(name + 7 + strlen(repo.head), value, valuelen);
data/tig-2.4.1/src/pager.c:72:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t datalen = strlen(data);
data/tig-2.4.1/src/pager.c:168: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).
	string_ncopy(view->env->text, text, strlen(text));
data/tig-2.4.1/src/parse.c:85: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).
		if (zone && strlen(zone) == STRING_SIZE(" +0700"))
data/tig-2.4.1/src/parse.c:116: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(text) <= SIZEOF_REV || pos[1] != ' ')
data/tig-2.4.1/src/parse.c:132: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 namelen = strlen(name);
data/tig-2.4.1/src/parse.c:145: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).
		string_ncopy_do(author, SIZEOF_STR, line, strlen(line));
data/tig-2.4.1/src/parse.c:164: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).
		string_ncopy(commit->title, line, strlen(line));
data/tig-2.4.1/src/parse.c:167:7:  [1] (buffer) strlen:
  Does not handle 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(line) <= SIZEOF_REV)
data/tig-2.4.1/src/parse.c:259: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).
		entry = calloc(1, sizeof(*entry) + strlen(path));
data/tig-2.4.1/src/parse.c:264:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(entry->path, path, strlen(path));
data/tig-2.4.1/src/parse.c:264: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).
		strncpy(entry->path, path, strlen(path));
data/tig-2.4.1/src/prompt.c:35:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t promptlen = strlen(prompt);
data/tig-2.4.1/src/prompt.c:42: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(prompt) > 0)
data/tig-2.4.1/src/prompt.c:46: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 buf_length = strlen(input->buf) + promptlen;
data/tig-2.4.1/src/prompt.c:56: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).
			int len = strlen(key.data.bytes);
data/tig-2.4.1/src/prompt.c:72:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				int changed_pos = strlen(input->buf);
data/tig-2.4.1/src/prompt.c:87:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				int changed_pos = strlen(input->buf);
data/tig-2.4.1/src/prompt.c:212:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	wmove(status_win, 0, strlen(rl_display_prompt) + rl_point);
data/tig-2.4.1/src/prompt.c:236: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).
		len = strlen(text);
data/tig-2.4.1/src/prompt.c:245: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).
			if (strlen(name) > len)
data/tig-2.4.1/src/prompt.c:286: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).
		len = strlen(text);
data/tig-2.4.1/src/prompt.c:296: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).
			if (strlen(name) > len)
data/tig-2.4.1/src/prompt.c:322: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).
		len = strlen(text);
data/tig-2.4.1/src/prompt.c:332: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).
			if (strlen(name) > len)
data/tig-2.4.1/src/prompt.c:375: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).
		len = strlen(text);
data/tig-2.4.1/src/prompt.c:385: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).
			if (strlen(name) > len)
data/tig-2.4.1/src/prompt.c:611: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).
		string_ncopy(argv_env.search, last_entry->line, strlen(last_entry->line));
data/tig-2.4.1/src/prompt.c:829: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).
	size_t optionlen = option ? strlen(option) : 0;
data/tig-2.4.1/src/prompt.c:890: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).
	size_t cmdlen = cmd ? strlen(cmd) : 0;
data/tig-2.4.1/src/prompt.c:921: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).
		string_ncopy(view->env->search, search + 1, strlen(search + 1));
data/tig-2.4.1/src/prompt.c:946: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).
		if (!argv[1] || !strlen(argv[1]))
data/tig-2.4.1/src/prompt.c:957: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).
		    && strlen(argv[1]) > 0
data/tig-2.4.1/src/refdb.c:215: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).
		id	= name + strlen("refs/replace/");
data/tig-2.4.1/src/refdb.c:216: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).
		idlen	= namelen - strlen("refs/replace/");
data/tig-2.4.1/src/refdb.c:218: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).
		namelen	= strlen(name);
data/tig-2.4.1/src/refdb.c:223:7:  [1] (buffer) strlen:
  Does not handle 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(opt->head) == namelen &&
data/tig-2.4.1/src/refdb.c:253:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ref->name, name, namelen);
data/tig-2.4.1/src/refdb.c:326: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).
		string_ncopy(ls_remote_cmd, env, strlen(env));
data/tig-2.4.1/src/refdb.c:374: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).
	return add_to_refs(id, strlen(id), name, strlen(name), &opt);
data/tig-2.4.1/src/refdb.c:374: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).
	return add_to_refs(id, strlen(id), name, strlen(name), &opt);
data/tig-2.4.1/src/refdb.c:391: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).
		string_ncopy(env->tag, ref->name, strlen(ref->name));
data/tig-2.4.1/src/refdb.c:399: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).
		string_ncopy(env->branch, sep + 1, strlen(sep + 1));
data/tig-2.4.1/src/refdb.c:402:40:  [1] (buffer) strlen:
  Does not handle 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_ncopy(env->branch, ref->name, strlen(ref->name));
data/tig-2.4.1/src/refdb.c:436:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t arglen = strlen(arg);
data/tig-2.4.1/src/refs.c:114: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).
			string_expand(reference->title, sizeof(reference->title), title, strlen(title), 1);
data/tig-2.4.1/src/refs.c:153: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).
		struct ref *ref = calloc(1, sizeof(*refs_all) + strlen(REFS_ALL_NAME));
data/tig-2.4.1/src/refs.c:158:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ref->name, REFS_ALL_NAME, strlen(REFS_ALL_NAME));
data/tig-2.4.1/src/refs.c:158: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).
		strncpy(ref->name, REFS_ALL_NAME, strlen(REFS_ALL_NAME));
data/tig-2.4.1/src/refs.c:188:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	string_ncopy(view->env->ref, reference->ref->name, strlen(reference->ref->name));
data/tig-2.4.1/src/repo.c:69: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).
			string_ncopy(repo.head, head, strlen(head) + 1);
data/tig-2.4.1/src/request.c:29: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).
	int namelen = strlen(name);
data/tig-2.4.1/src/search.c:245: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).
		string_ncopy(argv_env.search, search, strlen(search));
data/tig-2.4.1/src/stage.c:64:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!io_write(io, text, strlen(text)) ||
data/tig-2.4.1/src/stage.c:444: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).
				string_ncopy(view->env->file, file, strlen(file));
data/tig-2.4.1/src/status.c:553: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 (type == LINE_STAT_UNTRACKED && !suffixcmp(name, strlen(name), "/")) {
data/tig-2.4.1/src/string.c:51:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = slen >= 0 ? slen : strlen(str);
data/tig-2.4.1/src/string.c:52:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t suffixlen = strlen(suffix);
data/tig-2.4.1/src/string.c:63:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(dst, src, srclen);
data/tig-2.4.1/src/string.c:135: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).
	int namelen = strlen(name) - 1;
data/tig-2.4.1/src/string.c:375: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).
	ssize_t textlen = strlen(text);
data/tig-2.4.1/src/tig.c:535: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).
			} else if (strlen(opt) >= 2 && *opt == '+' && string_isnumber(opt + 1)) {
data/tig-2.4.1/src/tree.c:39: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 pathlen = strlen(view->env->directory);
data/tig-2.4.1/src/tree.c:127: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).
	struct line *line = add_line_alloc(view, &entry, type, strlen(path), custom);
data/tig-2.4.1/src/tree.c:132:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(entry->name, path, strlen(path));
data/tig-2.4.1/src/tree.c:132: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).
	strncpy(entry->name, path, strlen(path));
data/tig-2.4.1/src/tree.c:189: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).
		if (*view->env->directory && !strncmp(text, view->env->directory, strlen(view->env->directory)))
data/tig-2.4.1/src/tree.c:190: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).
			text += strlen(view->env->directory);
data/tig-2.4.1/src/tree.c:244:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t pathlen = strlen(path);
data/tig-2.4.1/src/tree.c:245:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t striplen = strlen(view->env->directory);
data/tig-2.4.1/src/tree.c:316: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).
	fd = mkstemps(file, strlen(name) + 1);
data/tig-2.4.1/src/types.c:99: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 namelen = strlen(name);
data/tig-2.4.1/src/ui.c:73:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(finder->file[files]->text, buf.data, buf.size);
data/tig-2.4.1/src/ui.c:186: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).
		text = pos + strlen(*search);
data/tig-2.4.1/src/util.c:221: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).
		string_ncopy(format_buf, format, strlen(format));
data/tig-2.4.1/src/util.c:363:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int length = end ? end - email : strlen(email);
data/tig-2.4.1/src/view.c:339: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).
	for (idlen = strlen(id); view_has_line(view, line); line++) {
data/tig-2.4.1/src/view.c:476:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (!view->ops->read(view, NULL, force))
data/tig-2.4.1/src/view.c:490: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).
	string_ncopy(view->vid, vid, strlen(vid));
data/tig-2.4.1/src/view.c:611:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (!view->ops->read(view, &line, false)) {
data/tig-2.4.1/src/view.c:828: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).
		view->keymap = get_keymap(view->name, strlen(view->name));
data/tig-2.4.1/src/view.c:1136: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(*pos) > len)
data/tig-2.4.1/src/view.c:1198: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).
	string_ncopy(buf, arg, strlen(arg));
data/tig-2.4.1/src/view.c:1200: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).
	for (pos = buf, end = pos + strlen(pos); code == SUCCESS && pos <= end; first = false) {
data/tig-2.4.1/src/view.c:1235: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).
		if (!strncmp(view_name, view->name, strlen(view->name)))
data/tig-2.4.1/src/view.c:1549:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(dst, src, srclen);
data/tig-2.4.1/src/view.c:1644:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return add_line_text_at_(view, pos, text, strlen(text), type, cells, false);

ANALYSIS SUMMARY:

Hits = 448
Lines analyzed = 40367 in approximately 1.74 seconds (23216 lines/second)
Physical Source Lines of Code (SLOC) = 32986
Hits@level = [0]  28 [1] 210 [2] 196 [3]  29 [4]  13 [5]   0
Hits@level+ = [0+] 476 [1+] 448 [2+] 238 [3+]  42 [4+]  13 [5+]   0
Hits/KSLOC@level+ = [0+] 14.4304 [1+] 13.5815 [2+] 7.21518 [3+] 1.27327 [4+] 0.394107 [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.