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/calcurse-4.6.0/src/dmon.c
Examining data/calcurse-4.6.0/src/utils.c
Examining data/calcurse-4.6.0/src/day.c
Examining data/calcurse-4.6.0/src/llist_ts.h
Examining data/calcurse-4.6.0/src/strings.c
Examining data/calcurse-4.6.0/src/note.c
Examining data/calcurse-4.6.0/src/args.c
Examining data/calcurse-4.6.0/src/utf8.c
Examining data/calcurse-4.6.0/src/vector.h
Examining data/calcurse-4.6.0/src/listbox.c
Examining data/calcurse-4.6.0/src/pcal.c
Examining data/calcurse-4.6.0/src/custom.c
Examining data/calcurse-4.6.0/src/notify.c
Examining data/calcurse-4.6.0/src/mem.c
Examining data/calcurse-4.6.0/src/sigs.c
Examining data/calcurse-4.6.0/src/llist.h
Examining data/calcurse-4.6.0/src/ui-todo.c
Examining data/calcurse-4.6.0/src/getstring.c
Examining data/calcurse-4.6.0/src/sha1.h
Examining data/calcurse-4.6.0/src/wins.c
Examining data/calcurse-4.6.0/src/vars.c
Examining data/calcurse-4.6.0/src/ui-calendar.c
Examining data/calcurse-4.6.0/src/todo.c
Examining data/calcurse-4.6.0/src/sha1.c
Examining data/calcurse-4.6.0/src/calcurse.c
Examining data/calcurse-4.6.0/src/ical.c
Examining data/calcurse-4.6.0/src/llist.c
Examining data/calcurse-4.6.0/src/queue.c
Examining data/calcurse-4.6.0/src/recur.c
Examining data/calcurse-4.6.0/src/htable.h
Examining data/calcurse-4.6.0/src/keys.c
Examining data/calcurse-4.6.0/src/calcurse.h
Examining data/calcurse-4.6.0/src/apoint.c
Examining data/calcurse-4.6.0/src/event.c
Examining data/calcurse-4.6.0/src/vector.c
Examining data/calcurse-4.6.0/src/help.c
Examining data/calcurse-4.6.0/src/hooks.c
Examining data/calcurse-4.6.0/src/ui-day.c
Examining data/calcurse-4.6.0/src/config.c
Examining data/calcurse-4.6.0/src/io.c
Examining data/calcurse-4.6.0/test/run-test.c

FINAL RESULTS:

data/calcurse-4.6.0/src/calcurse.h:184:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  snprintf (msg + len, BUFSIZ - len, __VA_ARGS__);                            \
data/calcurse-4.6.0/src/calcurse.h:194:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  snprintf (msg, BUFSIZ, __VA_ARGS__);                                        \
data/calcurse-4.6.0/src/config.c:213:6:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	if (sscanf(val, "%s on %s", s1, s2) != 2)
data/calcurse-4.6.0/src/custom.c:835:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(buf, conf.empty_day);
data/calcurse-4.6.0/src/custom.c:838:4:  [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(conf.empty_day, buf);
data/calcurse-4.6.0/src/custom.c:840:4:  [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(conf.empty_day, EMPTY_DAY_DEFAULT);
data/calcurse-4.6.0/src/ical.c:334:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(log, header, file, major, minor, date);
data/calcurse-4.6.0/src/ical.c:781:6:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	if (sscanf(p, "FREQ=%s", freqstr) != 1) {
data/calcurse-4.6.0/src/io.c:993:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		if (sscanf(buf, "%s", key_label) != AWAITED) {
data/calcurse-4.6.0/src/io.c:1022:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			if (sscanf(tmpbuf, "%s", key_ch) == AWAITED) {
data/calcurse-4.6.0/src/io.c:1363:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		printf(proc_report, stats.lines);
data/calcurse-4.6.0/src/keys.c:709:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
				if (sscanf(p, "%s", key_ch) == 1) {
data/calcurse-4.6.0/src/notify.c:232:7:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		if (execlp(nbar.shell, nbar.shell, "-c", nbar.cmd, NULL) <
data/calcurse-4.6.0/src/strings.c:82:6:  [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.
	n = vsnprintf(sb->buf + sb->len, sb->bufsize - sb->len, format, ap);
data/calcurse-4.6.0/src/strings.c:84:7:  [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.
		n = vsnprintf(sb->buf + sb->len, sb->bufsize - sb->len, format,
data/calcurse-4.6.0/src/utils.c:277: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(choicestr, prefix);
data/calcurse-4.6.0/src/utils.c:283:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(choicestr, tmp);
data/calcurse-4.6.0/src/utils.c:1344: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(path, (char *const *)arg);
data/calcurse-4.6.0/src/utils.c:1696:6:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
					printf(numfmt, value);
data/calcurse-4.6.0/src/utils.c:1702:6:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
					printf(numfmt, value);
data/calcurse-4.6.0/src/utils.c:1708:6:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
					printf(numfmt, value);
data/calcurse-4.6.0/src/utils.c:1714:6:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
					printf(numfmt, value);
data/calcurse-4.6.0/src/vars.c:130: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(conf.empty_day, EMPTY_DAY_DEFAULT);
data/calcurse-4.6.0/src/vars.c:143: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(conf.day_heading, DAY_HEADING_DEFAULT);
data/calcurse-4.6.0/test/run-test.c:78: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(path, arg);
data/calcurse-4.6.0/test/run-test.c:127: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, format, arg);
data/calcurse-4.6.0/test/run-test.c:152:6:  [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(filename, F_OK) != 0) {
data/calcurse-4.6.0/test/run-test.c:156: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(filename, F_OK) != 0)
data/calcurse-4.6.0/test/run-test.c:160:6:  [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(filename, X_OK) != 0)
data/calcurse-4.6.0/src/args.c:507:15:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt_long(argc, argv, optstr, longopts, NULL)) != -1) {
data/calcurse-4.6.0/src/args.c:528:15:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt_long(argc, argv, optstr, longopts, NULL)) != -1) {
data/calcurse-4.6.0/src/help.c:89:3:  [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("LANGUAGE"),
data/calcurse-4.6.0/src/help.c:90:3:  [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("LC_ALL"),
data/calcurse-4.6.0/src/help.c:91:3:  [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("LC_MESSAGE"),
data/calcurse-4.6.0/src/help.c:92:3:  [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("LANG")
data/calcurse-4.6.0/src/io.c:85:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((home = getenv("HOME")) != NULL)
data/calcurse-4.6.0/src/io.c:147:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char* home_dir = getenv("HOME");
data/calcurse-4.6.0/src/io.c:162:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	else if ((path_ddir = getenv("XDG_DATA_HOME")))
data/calcurse-4.6.0/src/io.c:176:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	else if ((path_cdir = getenv("XDG_CONFIG_HOME")))
data/calcurse-4.6.0/src/notify.c:139: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.
	if ((nbar.shell = getenv("SHELL")) == NULL)
data/calcurse-4.6.0/src/utils.c:429:7:  [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.
	tz = getenv("TZ");
data/calcurse-4.6.0/src/utils.c:763: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("TMPDIR"))
data/calcurse-4.6.0/src/utils.c:764:10:  [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.
		return getenv("TMPDIR");
data/calcurse-4.6.0/src/vars.c:151:7:  [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.
	ed = getenv("CALCURSE_EDITOR");
data/calcurse-4.6.0/src/vars.c:153:8:  [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.
		ed = getenv("VISUAL");
data/calcurse-4.6.0/src/vars.c:155:8:  [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.
		ed = getenv("EDITOR");
data/calcurse-4.6.0/src/vars.c:160:7:  [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.
	pg = getenv("CALCURSE_PAGER");
data/calcurse-4.6.0/src/vars.c:162:8:  [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.
		pg = getenv("PAGER");
data/calcurse-4.6.0/src/vars.c:167:7:  [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.
	mt = getenv("CALCURSE_MERGETOOL");
data/calcurse-4.6.0/src/vars.c:169:8:  [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.
		mt = getenv("MERGETOOL");
data/calcurse-4.6.0/src/apoint.c:201: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[BUFSIZ], *newline;
data/calcurse-4.6.0/src/args.c:256: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 date_str[BUFSIZ];
data/calcurse-4.6.0/src/args.c:434: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[BUFSIZ];
data/calcurse-4.6.0/src/args.c:541:13:  [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).
				range = atoi(optarg);
data/calcurse-4.6.0/src/args.c:572: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).
			limit = atoi(optarg);
data/calcurse-4.6.0/src/args.c:583:13:  [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).
				range = atoi(optarg);
data/calcurse-4.6.0/src/args.c:603: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).
				filter.priority = atoi(optarg);
data/calcurse-4.6.0/src/args.c:778: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).
			filter.priority = atoi(optarg);
data/calcurse-4.6.0/src/args.c:804: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).
			range = atoi(optarg);
data/calcurse-4.6.0/src/args.c:847:25:  [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).
			conf.input_datefmt = atoi(optarg);
data/calcurse-4.6.0/src/calcurse.c:554: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[BUFSIZ] = "";
data/calcurse-4.6.0/src/calcurse.h:180:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char msg[BUFSIZ];                                                           \
data/calcurse-4.6.0/src/calcurse.h:192:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char msg[BUFSIZ];                                                           \
data/calcurse-4.6.0/src/calcurse.h:294: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 empty_day[BUFSIZ];
data/calcurse-4.6.0/src/calcurse.h:298: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 output_datefmt[BUFSIZ];	/* format for displaying date */
data/calcurse-4.6.0/src/calcurse.h:301: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 day_heading[BUFSIZ];	/* format for displaying heading in appts panel */
data/calcurse-4.6.0/src/calcurse.h:491: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[BUFSIZ];
data/calcurse-4.6.0/src/calcurse.h:647: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 datefmt[BUFSIZ];	/* format for displaying date */
data/calcurse-4.6.0/src/calcurse.h:648: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 timefmt[BUFSIZ];	/* format for displaying time */
data/calcurse-4.6.0/src/calcurse.h:649: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[BUFSIZ];	/* notification command */
data/calcurse-4.6.0/src/config.c:151:11:  [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).
		*dest = atoi(val);
data/calcurse-4.6.0/src/config.c:166:11:  [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).
		*dest = atoi(val);
data/calcurse-4.6.0/src/config.c:179: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(dest, val, len + 1);
data/calcurse-4.6.0/src/config.c:211: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 s1[BUFSIZ], s2[BUFSIZ];
data/calcurse-4.6.0/src/config.c:290: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).
	wins_set_layout(atoi(val));
data/calcurse-4.6.0/src/config.c:296: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).
	wins_set_sbar_width(atoi(val));
data/calcurse-4.6.0/src/config.c:404: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 *color_name[NBCOLORS];
data/calcurse-4.6.0/src/config.c:406: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 *name[MAXCOLORS] = {
data/calcurse-4.6.0/src/config.c:561: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[BUFSIZ], e_conf[BUFSIZ];
data/calcurse-4.6.0/src/config.c:564:14:  [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).
	data_file = fopen(path_conf, "r");
data/calcurse-4.6.0/src/config.c:703:14:  [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).
	status.fp = fopen(tmppath, "w");
data/calcurse-4.6.0/src/custom.c:170: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 *layouts[LAYOUTH][NBLAYOUTS] = {
data/calcurse-4.6.0/src/custom.c:556: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[NB_OPTIONS] = {
data/calcurse-4.6.0/src/custom.c:858:10:  [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).
			val = atoi(buf);
data/calcurse-4.6.0/src/day.c:497: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 a_st[100], a_end[100];
data/calcurse-4.6.0/src/day.c:527: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[width * UTF8_MAXLEN];
data/calcurse-4.6.0/src/day.c:588: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 a_st[100], a_end[100];
data/calcurse-4.6.0/src/dmon.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).
	if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
data/calcurse-4.6.0/src/event.c:155: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[BUFSIZ], *nl;
data/calcurse-4.6.0/src/getstring.c:184: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 c[UTF8_MAXLEN];
data/calcurse-4.6.0/src/getstring.c:299: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(buf, *str, len + 1);
data/calcurse-4.6.0/src/getstring.c:307: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(*str, buf, len + 1);
data/calcurse-4.6.0/src/hooks.c: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 const *arg[2];
data/calcurse-4.6.0/src/ical.c:72:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *ical_recur_type[RECUR_TYPES] =
data/calcurse-4.6.0/src/ical.c:125: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 ical_date[BUFSIZ];
data/calcurse-4.6.0/src/ical.c:170: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 ical_date[BUFSIZ];
data/calcurse-4.6.0/src/ical.c:193: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 ical_datetime[BUFSIZ];
data/calcurse-4.6.0/src/ical.c:194: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 ical_date[BUFSIZ];
data/calcurse-4.6.0/src/ical.c:252: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 ical_datetime[BUFSIZ];
data/calcurse-4.6.0/src/ical.c:348: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 *typestr[ICAL_TYPES] = { "VEVENT", "VTODO" };
data/calcurse-4.6.0/src/ical.c:766: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 freqstr[BUFSIZ];
data/calcurse-4.6.0/src/ical.c:869: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[BUFSIZ];
data/calcurse-4.6.0/src/ical.c:1196: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[BUFSIZ], lstore[BUFSIZ];
data/calcurse-4.6.0/src/io.c:69: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 apts_sha1[SHA1_DIGESTLEN * 2 + 1];
data/calcurse-4.6.0/src/io.c:70: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 todo_sha1[SHA1_DIGESTLEN * 2 + 1];
data/calcurse-4.6.0/src/io.c:82: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 *file_ext[IO_EXPORT_NBTYPES] = { "ical", "txt" };
data/calcurse-4.6.0/src/io.c:97:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		stream = fopen(stream_name, "w");
data/calcurse-4.6.0/src/io.c:116:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(fname, "a");
data/calcurse-4.6.0/src/io.c:277:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((fp = fopen(aptsfile, "w")) == NULL)
data/calcurse-4.6.0/src/io.c:326:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((fp = fopen(todofile, "w")) == NULL)
data/calcurse-4.6.0/src/io.c:351:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(path_keys, "w")) == NULL)
data/calcurse-4.6.0/src/io.c:362:13:  [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 *fp = fopen(path, "r");
data/calcurse-4.6.0/src/io.c:465: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 sha1_new[SHA1_DIGESTLEN * 2 + 1];
data/calcurse-4.6.0/src/io.c:561: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 note[MAX_NOTESIZ + 1], *notep;
data/calcurse-4.6.0/src/io.c:568:14:  [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).
	data_file = fopen(path_apts, "r");
data/calcurse-4.6.0/src/io.c:739: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[BUFSIZ], e_todo[BUFSIZ], note[MAX_NOTESIZ + 1];
data/calcurse-4.6.0/src/io.c:742:14:  [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).
	data_file = fopen(path_todo, "r");
data/calcurse-4.6.0/src/io.c:951: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[BUFSIZ];
data/calcurse-4.6.0/src/io.c:966:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	keyfp = fopen(path_keys, "r");
data/calcurse-4.6.0/src/io.c:972: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 key_label[BUFSIZ], *p;
data/calcurse-4.6.0/src/io.c:1016: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 key_ch[BUFSIZ], tmpbuf[BUFSIZ];
data/calcurse-4.6.0/src/io.c:1133:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (file && (fd = fopen(file, "r")) != NULL) {
data/calcurse-4.6.0/src/io.c:1152:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((fd = fopen(file, "w")) == NULL) {
data/calcurse-4.6.0/src/io.c:1267:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		stream = fopen(*stream_name, "r");
data/calcurse-4.6.0/src/io.c:1290: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 *stats_str[4];
data/calcurse-4.6.0/src/io.c:1304:13:  [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).
			stream = fopen(stream_name, "r");
data/calcurse-4.6.0/src/io.c:1403:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	log->fd = fopen(log->name, "w");
data/calcurse-4.6.0/src/io.c:1506: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 *lock = fopen(path_cpid, "r");
data/calcurse-4.6.0/src/io.c:1548:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!(fp = fopen(file, "w"))
data/calcurse-4.6.0/src/io.c:1568:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(file, "r")) == NULL)
data/calcurse-4.6.0/src/io.c:1587:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (file && (fp = fopen(file, "r"))) {
data/calcurse-4.6.0/src/io.c:1606:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp1 = fopen(file1, "rb");
data/calcurse-4.6.0/src/io.c:1607:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp2 = fopen(file2, "rb");
data/calcurse-4.6.0/src/io.c:1627: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 *buffer[BUFSIZ];
data/calcurse-4.6.0/src/io.c:1630: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).
	if (!(fp_src = fopen(src, "rb")))
data/calcurse-4.6.0/src/io.c:1632: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).
	if (!(fp_dst = fopen(dst, "wb")))
data/calcurse-4.6.0/src/keys.c:115: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 *keynames[KEY_MAX];
data/calcurse-4.6.0/src/keys.c:203:7:  [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).
	fd = fopen(file, "w");
data/calcurse-4.6.0/src/keys.c:248: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[UTF8_MAXLEN];
data/calcurse-4.6.0/src/keys.c:449: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 keystr[BUFSIZ];
data/calcurse-4.6.0/src/keys.c:461: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(keystr + keystrlen, LLIST_GET_DATA(i), entrylen - 1);
data/calcurse-4.6.0/src/keys.c:500: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 key[UTF8_MAXLEN + 1], *fmtkey;
data/calcurse-4.6.0/src/keys.c:566: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 *info[NBKEYS];
data/calcurse-4.6.0/src/keys.c:699: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 *p, tmpbuf[BUFSIZ];
data/calcurse-4.6.0/src/keys.c:705:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				char key_ch[BUFSIZ];
data/calcurse-4.6.0/src/note.c:45: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[MAX_NOTESIZ + 1];
data/calcurse-4.6.0/src/note.c:71:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(notepath, "w");
data/calcurse-4.6.0/src/note.c:104:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	} else if ((fp = fopen(tmppath, "r"))) {
data/calcurse-4.6.0/src/notify.c:49: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 time[NOTIFY_FIELD_LENGTH];
data/calcurse-4.6.0/src/notify.c:50: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 date[NOTIFY_FIELD_LENGTH];
data/calcurse-4.6.0/src/notify.c:272:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[txt_max_len * UTF8_MAXLEN];
data/calcurse-4.6.0/src/notify.c:592: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[maxlen * UTF8_MAXLEN];
data/calcurse-4.6.0/src/notify.c:616: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 valstr[BUFSIZ];
data/calcurse-4.6.0/src/notify.c:672:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy(opt[NOTIFYALL].valstr, "flagged-only");
data/calcurse-4.6.0/src/notify.c:674:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy(opt[NOTIFYALL].valstr, "unflagged-only");
data/calcurse-4.6.0/src/notify.c:676:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy(opt[NOTIFYALL].valstr, "all");
data/calcurse-4.6.0/src/notify.c:755:28:  [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).
		    is_all_digit(buf) && atoi(buf) >= 0
data/calcurse-4.6.0/src/notify.c:756:10:  [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).
		    && atoi(buf) <= DAYINSEC) {
data/calcurse-4.6.0/src/notify.c:758: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).
			nbar.cntdwn = atoi(buf);
data/calcurse-4.6.0/src/pcal.c:124: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 pcal_date[BUFSIZ];
data/calcurse-4.6.0/src/pcal.c:135: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 pcal_date[BUFSIZ], pcal_beg[BUFSIZ], pcal_end[BUFSIZ];
data/calcurse-4.6.0/src/pcal.c:148: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 pcal_date[BUFSIZ];
data/calcurse-4.6.0/src/pcal.c:222: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 pcal_date[BUFSIZ], pcal_beg[BUFSIZ], pcal_end[BUFSIZ];
data/calcurse-4.6.0/src/recur.c:404: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[BUFSIZ], *nl;
data/calcurse-4.6.0/src/recur.c:489: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[BUFSIZ], *nl;
data/calcurse-4.6.0/src/sha1.c:196: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(&ctx->buffer[j], data, (i = 64 - j));
data/calcurse-4.6.0/src/sha1.c:204: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(&ctx->buffer[j], &data[i], len - i);
data/calcurse-4.6.0/src/ui-calendar.c:655: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 selected_day[LDAY] = "";
data/calcurse-4.6.0/src/ui-day.c:377:13:  [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).
		newfreq = atoi(freqstr);
data/calcurse-4.6.0/src/ui-day.c:485: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 *choice_recur_evnt[2] = {
data/calcurse-4.6.0/src/ui-day.c:510: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 *choice_recur_appt[5] = {
data/calcurse-4.6.0/src/ui-day.c:551: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 *choice_appt[4] = {
data/calcurse-4.6.0/src/ui-day.c:597: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[BUFSIZ] = "";
data/calcurse-4.6.0/src/ui-day.c:660: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 item_time[LTIME] = "";
data/calcurse-4.6.0/src/ui-day.c:661: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 item_mesg[BUFSIZ] = "";
data/calcurse-4.6.0/src/ui-day.c:854: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 user_input[BUFSIZ] = "";
data/calcurse-4.6.0/src/ui-day.c:917:10:  [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).
		freq = atoi(user_input);
data/calcurse-4.6.0/src/ui-todo.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 todo_input[BUFSIZ] = "";
data/calcurse-4.6.0/src/ui-todo.c:145: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[BUFSIZ] = "";
data/calcurse-4.6.0/src/ui-todo.c:178: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[width * UTF8_MAXLEN];
data/calcurse-4.6.0/src/utf8.c:300: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 c[5]; /* 4 bytes + string termination */
data/calcurse-4.6.0/src/utils.c:130: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 msg[MSGLEN];
data/calcurse-4.6.0/src/utils.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 displmsg[MSGLEN];
data/calcurse-4.6.0/src/utils.c:207: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 avail_choice[nb_choice * UTF8_MAXLEN + nb_choice + 1];
data/calcurse-4.6.0/src/utils.c:269: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 choicestr[BUFSIZ];
data/calcurse-4.6.0/src/utils.c:271: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 char_choice[nb_choice + 2];
data/calcurse-4.6.0/src/utils.c:611:13:  [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).
		date.mm = atoi(current_month);
data/calcurse-4.6.0/src/utils.c:612:13:  [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).
		date.dd = atoi(current_day);
data/calcurse-4.6.0/src/utils.c:613:15:  [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).
		date.yyyy = atoi(current_year);
data/calcurse-4.6.0/src/utils.c:718: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/calcurse-4.6.0/src/utils.c:787:12:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	if ((fd = mkstemp(fullname)) == -1
data/calcurse-4.6.0/src/utils.c:1433: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(&t_attr, &t_attr_old, sizeof(struct termios));
data/calcurse-4.6.0/src/utils.c:1459: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 linestarter[BUFSIZ];
data/calcurse-4.6.0/src/utils.c:1460: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 buffer[BUFSIZ];
data/calcurse-4.6.0/src/utils.c:1473:13:  [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).
	notefile = fopen(path_to_notefile, "r");
data/calcurse-4.6.0/src/utils.c:1543: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[FS_EXT_MAXLEN];
data/calcurse-4.6.0/src/utils.c:1550:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy(extformat, "epoch");
data/calcurse-4.6.0/src/utils.c:1557:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy(extformat, "epoch");
data/calcurse-4.6.0/src/utils.c:1634: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[BUFSIZ];
data/calcurse-4.6.0/src/utils.c:1736: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 extformat[FS_EXT_MAXLEN];
data/calcurse-4.6.0/src/utils.c:1749:6:  [2] (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). Risk is low because the source is a constant string.
					strcpy(extformat, "epoch");
data/calcurse-4.6.0/src/utils.c:1804: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 extformat[FS_EXT_MAXLEN];
data/calcurse-4.6.0/src/utils.c:1892: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 extformat[FS_EXT_MAXLEN];
data/calcurse-4.6.0/src/vars.c:71:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *datefmt_str[DATE_FORMATS];
data/calcurse-4.6.0/test/run-test.c:142: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 filename[BUFSIZ];
data/calcurse-4.6.0/test/run-test.c:143: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 *arg1[3], *arg2[3];
data/calcurse-4.6.0/test/run-test.c:146: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 buf1[BUFSIZ], buf2[BUFSIZ];
data/calcurse-4.6.0/src/apoint.c:133:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(start, "..:..", 6);
data/calcurse-4.6.0/src/apoint.c:141:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(end, "..:..", 6);
data/calcurse-4.6.0/src/args.c:857:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(conf.output_datefmt, optarg,
data/calcurse-4.6.0/src/calcurse.c:563: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 (cmd_name[strlen(cmd_name) - 1] == '!') {
data/calcurse-4.6.0/src/calcurse.c:564: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).
		cmd_name[strlen(cmd_name) - 1] = '\0';
data/calcurse-4.6.0/src/config.c:174: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).
	int len = strlen(val);
data/calcurse-4.6.0/src/custom.c:160: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).
	const int BOXSIZ = strlen(box);
data/calcurse-4.6.0/src/custom.c:347: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 unsigned BARSIZ = strlen(bar);
data/calcurse-4.6.0/src/custom.c:348: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 unsigned BOXSIZ = strlen(box);
data/calcurse-4.6.0/src/custom.c:590: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).
					  XPOS + strlen(opt[COMPACT_PANELS]));
data/calcurse-4.6.0/src/custom.c:602: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).
		mvwaddstr(win, y, XPOS + strlen(opt[DEFAULT_PANEL]), panel);
data/calcurse-4.6.0/src/custom.c:609: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).
		mvwaddstr(win, y, XPOS + strlen(opt[CAL_VIEW]),
data/calcurse-4.6.0/src/custom.c:617: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).
		mvwaddstr(win, y, XPOS + strlen(opt[TODO_VIEW]),
data/calcurse-4.6.0/src/custom.c:625: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).
					  XPOS + strlen(opt[HEADER_LINE]));
data/calcurse-4.6.0/src/custom.c:631: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).
					  XPOS + strlen(opt[EVENT_SEPARATOR]));
data/calcurse-4.6.0/src/custom.c:637: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).
					  XPOS + strlen(opt[DAY_SEPARATOR]));
data/calcurse-4.6.0/src/custom.c:643: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).
					  XPOS + strlen(opt[EMPTY_APPT_LINE]));
data/calcurse-4.6.0/src/custom.c:649: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).
		mvwaddstr(win, y, XPOS + strlen(opt[EMPTY_DAY]),
data/calcurse-4.6.0/src/custom.c:657: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).
					  XPOS + strlen(opt[MULTIPLE_DAYS]));
data/calcurse-4.6.0/src/custom.c:663: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).
					  XPOS + strlen(opt[AUTO_SAVE]));
data/calcurse-4.6.0/src/custom.c:669: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).
					  XPOS + strlen(opt[AUTO_GC]));
data/calcurse-4.6.0/src/custom.c:675: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).
		mvwprintw(win, y, XPOS + strlen(opt[PERIODIC_SAVE]), "%d",
data/calcurse-4.6.0/src/custom.c:684: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).
					  XPOS + strlen(opt[SYSTEM_EVENTS]));
data/calcurse-4.6.0/src/custom.c:691: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).
					  XPOS + strlen(opt[CONFIRM_QUIT]));
data/calcurse-4.6.0/src/custom.c:697: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).
					  XPOS + strlen(opt[CONFIRM_DELETE]));
data/calcurse-4.6.0/src/custom.c:704: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).
					  XPOS + strlen(opt[SYSTEM_DIAGS]));
data/calcurse-4.6.0/src/custom.c:711: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).
		mvwaddstr(win, y, XPOS + strlen(opt[FIRST_DAY_OF_WEEK]),
data/calcurse-4.6.0/src/custom.c:720: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).
		mvwaddstr(win, y, XPOS + strlen(opt[OUTPUT_DATE_FMT]),
data/calcurse-4.6.0/src/custom.c:728: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).
		mvwprintw(win, y, XPOS + strlen(opt[INPUT_DATE_FMT]), "%d",
data/calcurse-4.6.0/src/custom.c:745: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).
		mvwaddstr(win, y, XPOS + strlen(opt[HEADING_POS]), position);
data/calcurse-4.6.0/src/custom.c:752: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).
		mvwaddstr(win, y, XPOS + strlen(opt[DAY_HEADING_FMT]),
data/calcurse-4.6.0/src/custom.c:885:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, conf.output_datefmt, BUFSIZ);
data/calcurse-4.6.0/src/custom.c:888:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(conf.output_datefmt, buf, BUFSIZ);
data/calcurse-4.6.0/src/custom.c:901:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, conf.day_heading, BUFSIZ);
data/calcurse-4.6.0/src/custom.c:904:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(conf.day_heading, buf, BUFSIZ);
data/calcurse-4.6.0/src/day.c:514: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).
		mvwprintw(win, y, x + 3 + strlen(a_st), " -> %s", a_end);
data/calcurse-4.6.0/src/day.c:537:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf, mesg, width * UTF8_MAXLEN);
data/calcurse-4.6.0/src/dmon.c:140:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(0022);
data/calcurse-4.6.0/src/getstring.c:84: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).
	memmove(str, str + cl, strlen(str) + 1);
data/calcurse-4.6.0/src/getstring.c:101: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).
	memmove(str + cl, str, strlen(str) + 1);
data/calcurse-4.6.0/src/getstring.c:292: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).
	int len = strlen(*str);
data/calcurse-4.6.0/src/getstring.c:304: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(buf);
data/calcurse-4.6.0/src/ical.c:510:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf, lstore, BUFSIZ);
data/calcurse-4.6.0/src/ical.c:522:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(buf, lstore + 1, BUFSIZ - strlen(buf) - 1);
data/calcurse-4.6.0/src/ical.c:522: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).
		strncat(buf, lstore + 1, BUFSIZ - strlen(buf) - 1);
data/calcurse-4.6.0/src/ical.c:872:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, p, buflen);
data/calcurse-4.6.0/src/ical.c:902: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).
	} else if (strlen(notestr) == 0) {
data/calcurse-4.6.0/src/io.c:578:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(data_file);
data/calcurse-4.6.0/src/io.c:595:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(data_file);
data/calcurse-4.6.0/src/io.c:617:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			    || getc(data_file) != ']')
data/calcurse-4.6.0/src/io.c:620:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			while ((c = getc(data_file)) == ' ') ;
data/calcurse-4.6.0/src/io.c:629:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(data_file);
data/calcurse-4.6.0/src/io.c:637:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			c = getc(data_file);
data/calcurse-4.6.0/src/io.c:640:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				while ((c = getc(data_file)) == ' ') ;
data/calcurse-4.6.0/src/io.c:642:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			} else if (c == '-' && getc(data_file) == '>') {
data/calcurse-4.6.0/src/io.c:649:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				c = getc(data_file);
data/calcurse-4.6.0/src/io.c:654:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						getc(data_file)) == ' ') ;
data/calcurse-4.6.0/src/io.c:658:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						getc(data_file)) == ' ') ;
data/calcurse-4.6.0/src/io.c:667:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				while ((c = getc(data_file)) == ' ') ;
data/calcurse-4.6.0/src/io.c:680:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(data_file);
data/calcurse-4.6.0/src/io.c:694:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			c = getc(data_file);
data/calcurse-4.6.0/src/io.c:697:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				while ((c = getc(data_file)) == ' ') ;
data/calcurse-4.6.0/src/io.c:701:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				while ((c = getc(data_file)) == ' ') ;
data/calcurse-4.6.0/src/io.c:750:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(data_file);
data/calcurse-4.6.0/src/io.c:755:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			c = getc(data_file);
data/calcurse-4.6.0/src/io.c:763:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			    || getc(data_file) != ']')
data/calcurse-4.6.0/src/io.c:766:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			while ((c = getc(data_file)) == ' ') ;
data/calcurse-4.6.0/src/io.c:774:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(data_file);
data/calcurse-4.6.0/src/io.c:914: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(data->label);
data/calcurse-4.6.0/src/io.c:921: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).
	const int KEYLEN = strlen(data1->label);
data/calcurse-4.6.0/src/io.c:923: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(data2->label) == KEYLEN
data/calcurse-4.6.0/src/io.c:989: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).
			memmove(buf, p, strlen(p));
data/calcurse-4.6.0/src/io.c:1005: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).
		p = buf + strlen(key_label) + 1;
data/calcurse-4.6.0/src/io.c:1020:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void)strncpy(tmpbuf, p, BUFSIZ);
data/calcurse-4.6.0/src/io.c:1055: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).
				p += strlen(key_ch) + 1;
data/calcurse-4.6.0/src/io.c:1352:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		char *read, *stat;
data/calcurse-4.6.0/src/io.c:1354:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		asprintf(&read, proc_report, stats.lines);
data/calcurse-4.6.0/src/io.c:1358:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		status_mesg(read, stat);
data/calcurse-4.6.0/src/io.c:1359:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		mem_free(read);
data/calcurse-4.6.0/src/io.c:1402:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(log->name, logname, sizeof(log->name));
data/calcurse-4.6.0/src/io.c:1588:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = (fgetc(fp) == '\n' && fgetc(fp) == EOF) || feof(fp);
data/calcurse-4.6.0/src/io.c:1588:31:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = (fgetc(fp) == '\n' && fgetc(fp) == EOF) || feof(fp);
data/calcurse-4.6.0/src/io.c:1610:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (fgetc(fp1) != fgetc(fp2))
data/calcurse-4.6.0/src/io.c:1610:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (fgetc(fp1) != fgetc(fp2))
data/calcurse-4.6.0/src/keys.c:458: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).
		entrylen = strlen(LLIST_GET_DATA(i)) + 1;
data/calcurse-4.6.0/src/keys.c:513:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(key, keys_action_firstkey(binding_key), UTF8_MAXLEN);
data/calcurse-4.6.0/src/keys.c:519:5:  [1] (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). Risk is low because the source is a constant character.
				strcpy(key, "g");
data/calcurse-4.6.0/src/keys.c:523:5:  [1] (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). Risk is low because the source is a constant character.
				strcpy(key, "l");
data/calcurse-4.6.0/src/keys.c:527:5:  [1] (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). Risk is low because the source is a constant character.
				strcpy(key, "s");
data/calcurse-4.6.0/src/keys.c:531:5:  [1] (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). Risk is low because the source is a constant character.
				strcpy(key, "c");
data/calcurse-4.6.0/src/keys.c:535:5:  [1] (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). Risk is low because the source is a constant character.
				strcpy(key, "n");
data/calcurse-4.6.0/src/keys.c:539:5:  [1] (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). Risk is low because the source is a constant character.
				strcpy(key, "k");
data/calcurse-4.6.0/src/keys.c:543:5:  [1] (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). Risk is low because the source is a constant character.
				strcpy(key, "?");
data/calcurse-4.6.0/src/keys.c:701:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(tmpbuf, keydef[i].binding, BUFSIZ);
data/calcurse-4.6.0/src/keys.c:719: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).
					p += strlen(key_ch);
data/calcurse-4.6.0/src/mem.c:116: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(str) + 1;
data/calcurse-4.6.0/src/mem.c:119:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	return strncpy(cp, str, len);
data/calcurse-4.6.0/src/mem.c:240: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).
	size = strlen(s);
data/calcurse-4.6.0/src/mem.c:244:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	return strncpy(buf, s, size + 1);
data/calcurse-4.6.0/src/note.c:152:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		buffer[i] = getc(fp);
data/calcurse-4.6.0/src/note.c:159:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (getc(fp) != ' ') ;
data/calcurse-4.6.0/src/note.c:167: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(data->hash);
data/calcurse-4.6.0/src/note.c:194:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(hp->buf, dp->d_name, MAX_NOTESIZ + 1);
data/calcurse-4.6.0/src/notify.c:132:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(nbar.datefmt, date_format, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:134:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(nbar.timefmt, time_format, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:136:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(nbar.cmd, cmd, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:257: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).
	    strlen(notify.date) + strlen(notify.time) + 7 + 2 * space;
data/calcurse-4.6.0/src/notify.c:257: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).
	    strlen(notify.date) + strlen(notify.time) + 7 + 2 * space;
data/calcurse-4.6.0/src/notify.c:258: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).
	app_pos = file_pos + strlen(notify.apts_file) + 2 + space;
data/calcurse-4.6.0/src/notify.c:274:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, notify_app.txt, txt_max_len * UTF8_MAXLEN);
data/calcurse-4.6.0/src/notify.c:587: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).
	x_opt = x + strlen(name);
data/calcurse-4.6.0/src/notify.c:590: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).
	if ((len = strlen(valstr)) != 0) {
data/calcurse-4.6.0/src/notify.c:594:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, valstr, maxlen * UTF8_MAXLEN);
data/calcurse-4.6.0/src/notify.c:655:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(opt[DATE].valstr, nbar.datefmt, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:656:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(opt[CLOCK].valstr, nbar.timefmt, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:658:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(opt[CMD].valstr, nbar.cmd, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:726:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, nbar.datefmt, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:731:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(nbar.datefmt, buf, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:739:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, nbar.timefmt, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:744:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(nbar.timefmt, buf, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:765:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, nbar.cmd, BUFSIZ);
data/calcurse-4.6.0/src/notify.c:770:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(nbar.cmd, buf, BUFSIZ);
data/calcurse-4.6.0/src/recur.c:122: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).
		else if (!strlen(days))
data/calcurse-4.6.0/src/recur.c:973:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = getc(data_file)) == '!') {
data/calcurse-4.6.0/src/sha1.c:243: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).
	sha1_update(&ctx, (const uint8_t *)buf, strlen(buf));
data/calcurse-4.6.0/src/ui-calendar.c:416: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).
	mvwprintw(sw->inner, ofs_y, (w - (strlen(cp) + 5)) / 2,
data/calcurse-4.6.0/src/ui-calendar.c:672: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(selected_day) == 0) {
data/calcurse-4.6.0/src/ui-day.c:225: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).
		if (*(timestr + strlen(timestr) - 1) == '?') {
data/calcurse-4.6.0/src/ui-day.c:410: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 (*(timstr + strlen(timstr) - 1) == '?') {
data/calcurse-4.6.0/src/ui-day.c:673: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(item_time) == 0) {
data/calcurse-4.6.0/src/ui-day.c:709: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(item_time) == 0) {
data/calcurse-4.6.0/src/ui-todo.c:203: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).
	width -= strlen(mark);
data/calcurse-4.6.0/src/utils.c:135:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(msg, errmsg, MSGLEN);
data/calcurse-4.6.0/src/utils.c:143: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).
	mvwaddstr(errwin, 5, (WINCOL - strlen(msg)) / 2, msg);
data/calcurse-4.6.0/src/utils.c:163:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(displmsg, msg, MSGLEN);
data/calcurse-4.6.0/src/utils.c:170: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).
	mvwaddstr(warnwin, 5, (WINCOL - strlen(displmsg)) / 2, displmsg);
data/calcurse-4.6.0/src/utils.c:314: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).
		mvwaddstr(popup_win, MSGXPOS, (pop_col - strlen(msg)) / 2,
data/calcurse-4.6.0/src/utils.c:321: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).
			  pop_col - (strlen(any_key) + 1), any_key);
data/calcurse-4.6.0/src/utils.c:333: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).
	int len = strlen(string);
data/calcurse-4.6.0/src/utils.c:608: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).
		strftime(current_day, strlen(current_day), "%d", &ptrtime);
data/calcurse-4.6.0/src/utils.c:609: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).
		strftime(current_month, strlen(current_month), "%m", &ptrtime);
data/calcurse-4.6.0/src/utils.c:610: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).
		strftime(current_year, strlen(current_year), "%Y", &ptrtime);
data/calcurse-4.6.0/src/utils.c:1109: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 (n == 0 && strlen(string) == 4) {
data/calcurse-4.6.0/src/utils.c:1440:2:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fgetc(stdin);
data/calcurse-4.6.0/src/utils.c:1482: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 (buffer[strlen(buffer) - 1] == '\n')
data/calcurse-4.6.0/src/vars.c:140:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(conf.output_datefmt, "%D", 3);

ANALYSIS SUMMARY:

Hits = 353
Lines analyzed = 22156 in approximately 0.64 seconds (34526 lines/second)
Physical Source Lines of Code (SLOC) = 16433
Hits@level = [0] 153 [1] 146 [2] 157 [3]  21 [4]  29 [5]   0
Hits@level+ = [0+] 506 [1+] 353 [2+] 207 [3+]  50 [4+]  29 [5+]   0
Hits/KSLOC@level+ = [0+] 30.7917 [1+] 21.4812 [2+] 12.5966 [3+] 3.04266 [4+] 1.76474 [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.