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/fortunate.app-3.1/ApplicationDelegate.h
Examining data/fortunate.app-3.1/FontomaticPanel.h
Examining data/fortunate.app-3.1/FortuneTextView.h
Examining data/fortunate.app-3.1/MainDocument.h
Examining data/fortunate.app-3.1/PreferencesController.h
Examining data/fortunate.app-3.1/fortune/fortune.c
Examining data/fortunate.app-3.1/fortune/pathnames.h
Examining data/fortunate.app-3.1/fortune/regexpr.c
Examining data/fortunate.app-3.1/fortune/regexpr.h
Examining data/fortunate.app-3.1/fortune/strfile.h

FINAL RESULTS:

data/fortunate.app-3.1/fortune/fortune.c:239:10:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		(void) chmod(Fortfile->path, 0666);
data/fortunate.app-3.1/fortune/regexpr.c:1556:7:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
      gets(buf);
data/fortunate.app-3.1/fortune/fortune.c:86:51:  [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.
# define        DPRINTF(l,x)    { if (Debug >= l) fprintf x; }
data/fortunate.app-3.1/fortune/fortune.c:493:10:  [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).
		(void) strcat(strcat(strcpy(path, dir), "/"), file);
data/fortunate.app-3.1/fortune/fortune.c:493:24:  [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).
		(void) strcat(strcat(strcpy(path, dir), "/"), file);
data/fortunate.app-3.1/fortune/fortune.c:593:22:  [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.
	fp->was_pos_file = (access(fp->posfile, W_OK) >= 0);
data/fortunate.app-3.1/fortune/fortune.c:699:27:  [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.
	obscene->was_pos_file = (access(obscene->posfile, W_OK) >= 0);
data/fortunate.app-3.1/fortune/fortune.c:820: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(datfile, R_OK) < 0) {
data/fortunate.app-3.1/fortune/regexpr.c:1631:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	      sprintf(buf, "%s %d", cp, a + pos);
data/fortunate.app-3.1/fortune/fortune.c:216:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom((int)(time((time_t *) NULL) + getpid()));
data/fortunate.app-3.1/fortune/fortune.c:325:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "aDefilm:osw")) != -1)
data/fortunate.app-3.1/fortune/fortune.c:327:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "aefilm:osw")) != -1)
data/fortunate.app-3.1/fortune/fortune.c:978:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		choice = random() % 100;
data/fortunate.app-3.1/fortune/fortune.c:998:13:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			choice = random() % Noprob_tbl.str_numstr;
data/fortunate.app-3.1/fortune/fortune.c:1040:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		choice = random() % parent->num_children;
data/fortunate.app-3.1/fortune/fortune.c:1050:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		choice = random() % parent->tbl.str_numstr;
data/fortunate.app-3.1/fortune/fortune.c:1139:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			fp->pos = random() % fp->tbl.str_numstr;
data/fortunate.app-3.1/fortune/fortune.c:1145:13:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		fp->pos = random() % fp->tbl.str_numstr;
data/fortunate.app-3.1/fortune/fortune.c:259:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	line[BUFSIZ];
data/fortunate.app-3.1/fortune/fortune.c:287:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		line[BUFSIZ];
data/fortunate.app-3.1/fortune/fortune.c:518: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, 0)) < 0) {
data/fortunate.app-3.1/fortune/fortune.c:635:9:  [2] (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). Risk is low because the
  source is a constant string.
	return strcat(new, "-o");
data/fortunate.app-3.1/fortune/fortune.c:671: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(offensive, 0)) < 0)
data/fortunate.app-3.1/fortune/fortune.c:819:2:  [2] (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). Risk is low because the
  source is a constant string.
	strcat(datfile, ".dat");
data/fortunate.app-3.1/fortune/fortune.c:836:10:  [2] (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). Risk is low because the
  source is a constant string.
		(void) strcat(*posp, ".pos");
data/fortunate.app-3.1/fortune/fortune.c:1115:36:  [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 (fp->datfd < 0 && (fp->datfd = open(fp->datfile, 0)) < 0) {
data/fortunate.app-3.1/fortune/fortune.c:1137:13:  [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(fp->posfile, 0)) < 0 ||
data/fortunate.app-3.1/fortune/fortune.c:1167:13:  [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(fp->datfile, 0)) < 0) {
data/fortunate.app-3.1/fortune/regexpr.c:107:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char regexp_plain_ops[256];
data/fortunate.app-3.1/fortune/regexpr.c:108:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char regexp_quoted_ops[256];
data/fortunate.app-3.1/fortune/regexpr.c:109:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char regexp_precedences[Rnum_ops];
data/fortunate.app-3.1/fortune/regexpr.c:138:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char re_syntax_table[256];
data/fortunate.app-3.1/fortune/regexpr.c:868: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 small_visited[512], *visited;
data/fortunate.app-3.1/fortune/regexpr.c:919: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 *regstart_text[RE_NREGS], *regstart_partend[RE_NREGS];
data/fortunate.app-3.1/fortune/regexpr.c:920: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 *regend_text[RE_NREGS], *regend_partend[RE_NREGS];
data/fortunate.app-3.1/fortune/regexpr.c:1119:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char map[256], can_be_null;
data/fortunate.app-3.1/fortune/regexpr.c:1247:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy((char *)failure_stack_start, (char *)initial_failure_stack,
data/fortunate.app-3.1/fortune/regexpr.c:1539: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[500];
data/fortunate.app-3.1/fortune/regexpr.c:1544: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 fastmap[256];
data/fortunate.app-3.1/fortune/regexpr.c:1571:8:  [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(buf, "end");
data/fortunate.app-3.1/fortune/regexpr.c:1574:8:  [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(buf, "bol");
data/fortunate.app-3.1/fortune/regexpr.c:1577:8:  [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(buf, "eol");
data/fortunate.app-3.1/fortune/regexpr.c:1580:8:  [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(buf, "set ");
data/fortunate.app-3.1/fortune/regexpr.c:1582:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf+strlen(buf)," %02x",
data/fortunate.app-3.1/fortune/regexpr.c:1586:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(buf, "exact '%c' 0x%x", exp.buffer[pos],
data/fortunate.app-3.1/fortune/regexpr.c:1591:8:  [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(buf, "anychar");
data/fortunate.app-3.1/fortune/regexpr.c:1594:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(buf, "start_memory %d", exp.buffer[pos++]);
data/fortunate.app-3.1/fortune/regexpr.c:1597:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(buf, "end_memory %d", exp.buffer[pos++]);
data/fortunate.app-3.1/fortune/regexpr.c:1600:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(buf, "match_memory %d", exp.buffer[pos++]);
data/fortunate.app-3.1/fortune/regexpr.c:1634:8:  [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(buf,"begbuf");
data/fortunate.app-3.1/fortune/regexpr.c:1637:8:  [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(buf,"endbuf");
data/fortunate.app-3.1/fortune/regexpr.c:1640:8:  [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(buf,"wordbeg");
data/fortunate.app-3.1/fortune/regexpr.c:1643:8:  [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(buf,"wordend");
data/fortunate.app-3.1/fortune/regexpr.c:1646:8:  [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(buf,"wordbound");
data/fortunate.app-3.1/fortune/regexpr.c:1649:8:  [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(buf,"notwordbound");
data/fortunate.app-3.1/fortune/regexpr.c:1652:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(buf, "unknown code %d",
data/fortunate.app-3.1/fortune/strfile.h:52:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char	stuff[4];		/* long aligned space */
data/fortunate.app-3.1/fortune/fortune.c:297:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			nchar += strlen(line);
data/fortunate.app-3.1/fortune/fortune.c:492: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).
		path = do_malloc((unsigned int) (strlen(dir) + strlen(file) + 2));
data/fortunate.app-3.1/fortune/fortune.c:492:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		path = do_malloc((unsigned int) (strlen(dir) + strlen(file) + 2));
data/fortunate.app-3.1/fortune/fortune.c:493:17:  [1] (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). Risk is low because the
  source is a constant character.
		(void) strcat(strcat(strcpy(path, dir), "/"), file);
data/fortunate.app-3.1/fortune/fortune.c:634:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	new = copy(file, (unsigned int) (strlen(file) + 2));
data/fortunate.app-3.1/fortune/fortune.c:648: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(file);
data/fortunate.app-3.1/fortune/fortune.c:790: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).
		i = strlen(file);
data/fortunate.app-3.1/fortune/fortune.c:818:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	datfile = copy(file, (unsigned int) (strlen(file) + 4)); /* +4 for ".dat" */
data/fortunate.app-3.1/fortune/fortune.c:835:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		*posp = copy(file, (unsigned int) (strlen(file) + 4)); /* +4 for ".dat" */
data/fortunate.app-3.1/fortune/fortune.c:1023:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read(fp->datfd, Seekpts, sizeof Seekpts);
data/fortunate.app-3.1/fortune/fortune.c:1138:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    read(fd, &fp->pos, sizeof fp->pos) != sizeof fp->pos)
data/fortunate.app-3.1/fortune/fortune.c:1171:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, (char *) &fp->tbl, sizeof fp->tbl) != sizeof fp->tbl) {
data/fortunate.app-3.1/fortune/fortune.c:1370: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).
				sp += strlen(sp);
data/fortunate.app-3.1/fortune/regexpr.c:1523:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return re_compile_pattern(s, strlen(s), &re_comp_buf);
data/fortunate.app-3.1/fortune/regexpr.c:1529:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen(s);
data/fortunate.app-3.1/fortune/regexpr.c:1557: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).
      cp=re_compile_pattern(buf, strlen(buf), &exp);
data/fortunate.app-3.1/fortune/regexpr.c:1582: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).
		sprintf(buf+strlen(buf)," %02x",
data/fortunate.app-3.1/fortune/regexpr.c:1671: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).
	  a = re_search_pattern(&exp, buf, strlen(buf), 0, strlen(buf), &regs);
data/fortunate.app-3.1/fortune/regexpr.c:1671:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  a = re_search_pattern(&exp, buf, strlen(buf), 0, strlen(buf), &regs);

ANALYSIS SUMMARY:

Hits = 76
Lines analyzed = 3461 in approximately 0.12 seconds (29375 lines/second)
Physical Source Lines of Code (SLOC) = 2776
Hits@level = [0]  41 [1]  19 [2]  39 [3]   9 [4]   7 [5]   2
Hits@level+ = [0+] 117 [1+]  76 [2+]  57 [3+]  18 [4+]   9 [5+]   2
Hits/KSLOC@level+ = [0+] 42.147 [1+] 27.3775 [2+] 20.5331 [3+] 6.48415 [4+] 3.24207 [5+] 0.720461
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.