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/mboxgrep-0.7.9/src/getopt.c
Examining data/mboxgrep-0.7.9/src/getopt.h
Examining data/mboxgrep-0.7.9/src/getopt1.c
Examining data/mboxgrep-0.7.9/src/info.h
Examining data/mboxgrep-0.7.9/src/maildir.c
Examining data/mboxgrep-0.7.9/src/maildir.h
Examining data/mboxgrep-0.7.9/src/mbox.c
Examining data/mboxgrep-0.7.9/src/mbox.h
Examining data/mboxgrep-0.7.9/src/md5.c
Examining data/mboxgrep-0.7.9/src/md5.h
Examining data/mboxgrep-0.7.9/src/mh.c
Examining data/mboxgrep-0.7.9/src/mh.h
Examining data/mboxgrep-0.7.9/src/misc.c
Examining data/mboxgrep-0.7.9/src/misc.h
Examining data/mboxgrep-0.7.9/src/scan.c
Examining data/mboxgrep-0.7.9/src/scan.h
Examining data/mboxgrep-0.7.9/src/wrap.c
Examining data/mboxgrep-0.7.9/src/wrap.h
Examining data/mboxgrep-0.7.9/src/main.c
Examining data/mboxgrep-0.7.9/src/mboxgrep.h
Examining data/mboxgrep-0.7.9/src/info.c

FINAL RESULTS:

data/mboxgrep-0.7.9/src/maildir.c:82:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (dirname, "%s/new", path);
data/mboxgrep-0.7.9/src/maildir.c:96:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (dirname, "%s/cur", path);
data/mboxgrep-0.7.9/src/maildir.c:180:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (filename, "%s/new/%s", boxname, d_content->d_name);
data/mboxgrep-0.7.9/src/maildir.c:182:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (filename, "%s/cur/%s", boxname, d_content->d_name);
data/mboxgrep-0.7.9/src/maildir.c:221:8:  [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 (message->headers + message->hbytes, buffer);
data/mboxgrep-0.7.9/src/maildir.c:229:8:  [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 (message->body + message->bbytes, buffer);
data/mboxgrep-0.7.9/src/maildir.c:259:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (bla, "%i.%i_%i.%s", t, config.pid, maildir_count, config.hostname);
data/mboxgrep-0.7.9/src/maildir.c:261:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(s1, "%s/tmp/%s", path, bla);
data/mboxgrep-0.7.9/src/maildir.c:263:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(s2, "%s/new/%s", path, bla);
data/mboxgrep-0.7.9/src/maildir.c:280:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (s, "%s/cur", path);
data/mboxgrep-0.7.9/src/maildir.c:285:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (s, "%s/new", path);
data/mboxgrep-0.7.9/src/maildir.c:290:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(s, "%s/tmp", path);
data/mboxgrep-0.7.9/src/maildir.c:311:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(s, "%s", path);
data/mboxgrep-0.7.9/src/maildir.c:315:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(s, "%s/new", path);
data/mboxgrep-0.7.9/src/maildir.c:319:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(s, "%s/cur", path);
data/mboxgrep-0.7.9/src/maildir.c:323:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(s, "%s/tmp", path);
data/mboxgrep-0.7.9/src/mbox.c:211:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy (mp->postmark_cache, buffer);
data/mboxgrep-0.7.9/src/mbox.c:262: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 (message->headers + message->hbytes, mp->postmark_cache);
data/mboxgrep-0.7.9/src/mbox.c:328: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 (message->headers + message->hbytes, buffer);
data/mboxgrep-0.7.9/src/mbox.c:335:8:  [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 (mp->postmark_cache, buffer);
data/mboxgrep-0.7.9/src/mbox.c:341: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 (message->body + message->bbytes, buffer);
data/mboxgrep-0.7.9/src/mbox.c:374:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (tmpfilename, "%s%s", tmpdir, fname);
data/mboxgrep-0.7.9/src/mh.c:121:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf (filename, "%s/%s", boxname, d_content->d_name);
data/mboxgrep-0.7.9/src/mh.c:178:8:  [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 (message->headers + message->hbytes, buffer);
data/mboxgrep-0.7.9/src/mh.c:186:8:  [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 (message->body + message->bbytes, buffer);
data/mboxgrep-0.7.9/src/mh.c:234:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (s1, "%s/%i", path, y);
data/mboxgrep-0.7.9/src/scan.c:218:15:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	      outf = popen (pipecmd, "w");
data/mboxgrep-0.7.9/src/getopt.c:189: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.
char *getenv ();
data/mboxgrep-0.7.9/src/getopt.c:349:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      else if (getenv ("POSIXLY_CORRECT") != NULL)
data/mboxgrep-0.7.9/src/getopt.c:648:1:  [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.
getopt (argc, argv, optstring)
data/mboxgrep-0.7.9/src/getopt.c:678:11:  [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.
      c = getopt (argc, argv, "abc:d:0123456789");
data/mboxgrep-0.7.9/src/getopt.h:102:12:  [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.
extern int getopt (int argc, char *const *argv, const char *shortopts);
data/mboxgrep-0.7.9/src/getopt.h:104:12:  [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.
extern int getopt ();
data/mboxgrep-0.7.9/src/getopt.h:106:12:  [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.
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
data/mboxgrep-0.7.9/src/getopt.h:118:12:  [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.
extern int getopt ();
data/mboxgrep-0.7.9/src/getopt.h:119:12:  [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.
extern int getopt_long ();
data/mboxgrep-0.7.9/src/getopt1.c:47: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.
char *getenv ();
data/mboxgrep-0.7.9/src/getopt1.c:55:1:  [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.
getopt_long (argc, argv, options, long_options, opt_index)
data/mboxgrep-0.7.9/src/getopt1.c:111:11:  [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.
      c = getopt_long (argc, argv, "abc:d:0123456789",
data/mboxgrep-0.7.9/src/main.c:126:11:  [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.
      c = getopt_long (argc, argv, "BcdEe:GHhil:m:n:o:Pp:rsVv", long_options, 
data/mboxgrep-0.7.9/src/mbox.c:362: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.
    tmpdir = getenv ("TMPDIR");
data/mboxgrep-0.7.9/src/getopt.c:183:31:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define	my_bcopy(src, dst, n)	memcpy ((dst), (src), (n))
data/mboxgrep-0.7.9/src/maildir.c:122: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 *filename, buffer[BUFSIZ];
data/mboxgrep-0.7.9/src/maildir.c:252: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 bla[BUFSIZ], *s1, *s2;
data/mboxgrep-0.7.9/src/main.c:78: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 errbuf[BUFSIZ];
data/mboxgrep-0.7.9/src/mbox.c:61:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[BUFSIZ];
data/mboxgrep-0.7.9/src/mbox.c:176: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 c[1] = "\0";
data/mboxgrep-0.7.9/src/mbox.c:243:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[BUFSIZ];
data/mboxgrep-0.7.9/src/mbox.c:294: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 c[1] = "\0";
data/mboxgrep-0.7.9/src/mbox.c:375:9:  [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).
  foo = mkstemp (tmpfilename);
data/mboxgrep-0.7.9/src/mboxgrep.h:124: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 hostname[HOST_NAME_SIZE];
data/mboxgrep-0.7.9/src/md5.c:34:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define memcpy(d, s, n) bcopy ((s), (d), (n))
data/mboxgrep-0.7.9/src/md5.c:34:27:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define memcpy(d, s, n) bcopy ((s), (d), (n))
data/mboxgrep-0.7.9/src/md5.c:66:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ...  */ };
data/mboxgrep-0.7.9/src/md5.c:122:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (&ctx->buffer[bytes], fillbuf, pad);
data/mboxgrep-0.7.9/src/md5.c:146:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[BLOCKSIZE + 72];
data/mboxgrep-0.7.9/src/md5.c:232:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (&ctx->buffer[left_over], buffer, add);
data/mboxgrep-0.7.9/src/md5.c:241:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63],
data/mboxgrep-0.7.9/src/md5.c:262:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (&ctx->buffer[left_over], buffer, len);
data/mboxgrep-0.7.9/src/md5.c:268:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (ctx->buffer, &ctx->buffer[64], left_over);
data/mboxgrep-0.7.9/src/md5.h:83:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[128];
data/mboxgrep-0.7.9/src/mh.c:88:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[BUFSIZ], *filename;
data/mboxgrep-0.7.9/src/mh.c:221: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 s1[BUFSIZ];
data/mboxgrep-0.7.9/src/misc.c:130: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 *blah1, blah2[BUFSIZ];
data/mboxgrep-0.7.9/src/scan.c:94: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 date_str[80];
data/mboxgrep-0.7.9/src/scan.c:295: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 *p[2];
data/mboxgrep-0.7.9/src/scan.c:325:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 b[16];
data/mboxgrep-0.7.9/src/wrap.c:62:10:  [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).
  blah = open (pathname, flags, mode);
data/mboxgrep-0.7.9/src/wrap.c:81: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).
  blah = fopen (path, mode);
data/mboxgrep-0.7.9/src/getopt.c:457: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).
	    if (s - nextchar == strlen (p->name))
data/mboxgrep-0.7.9/src/getopt.c:481: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).
	  nextchar += strlen (nextchar);
data/mboxgrep-0.7.9/src/getopt.c:511: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).
		  nextchar += strlen (nextchar);
data/mboxgrep-0.7.9/src/getopt.c:524: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).
		  nextchar += strlen (nextchar);
data/mboxgrep-0.7.9/src/getopt.c:528: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).
	  nextchar += strlen (nextchar);
data/mboxgrep-0.7.9/src/maildir.c:28: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).
# define NAMLEN(dirent) strlen((dirent)->d_name)
data/mboxgrep-0.7.9/src/maildir.c:79:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  dirname = (char *) xmalloc((sizeof (char) * (strlen (path) + 5)));
data/mboxgrep-0.7.9/src/maildir.c:171: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).
	(char *) xmalloc ((sizeof (char)*((strlen (d_content->d_name)) 
data/mboxgrep-0.7.9/src/maildir.c:172: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).
					  + (strlen (boxname)) + 6)));
data/mboxgrep-0.7.9/src/maildir.c:194: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).
	  s = strlen (buffer);
data/mboxgrep-0.7.9/src/maildir.c:260: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).
  s1 = (char *) xmalloc ((strlen (path) + strlen (bla) + 6) * sizeof (char));
data/mboxgrep-0.7.9/src/maildir.c:260:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  s1 = (char *) xmalloc ((strlen (path) + strlen (bla) + 6) * sizeof (char));
data/mboxgrep-0.7.9/src/maildir.c:262: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).
  s2 = (char *) xmalloc ((strlen (path) + strlen (bla) + 6) * sizeof (char));
data/mboxgrep-0.7.9/src/maildir.c:262:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  s2 = (char *) xmalloc ((strlen (path) + strlen (bla) + 6) * sizeof (char));
data/mboxgrep-0.7.9/src/maildir.c:278: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).
  s = (char *) xmalloc ((strlen (path) + 5) * sizeof (char));
data/mboxgrep-0.7.9/src/maildir.c:306: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).
  s = (char *) xmalloc ((strlen (path) + 4) * sizeof(char));
data/mboxgrep-0.7.9/src/maildir.h:28: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).
# define NAMLEN(dirent) strlen((dirent)->d_name)
data/mboxgrep-0.7.9/src/mbox.c:258: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).
  s = strlen (mp->postmark_cache);
data/mboxgrep-0.7.9/src/mbox.c:315: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).
      s = strlen (buffer);
data/mboxgrep-0.7.9/src/mbox.c:372: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).
  tmpfilename = (char *) xmalloc ((strlen (tmpdir) + (strlen (fname) + 1))
data/mboxgrep-0.7.9/src/mbox.c:372:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  tmpfilename = (char *) xmalloc ((strlen (tmpdir) + (strlen (fname) + 1))
data/mboxgrep-0.7.9/src/mh.c:26: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).
# define NAMLEN(dirent) strlen((dirent)->d_name)
data/mboxgrep-0.7.9/src/mh.c:112: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).
	(filename, ((strlen (d_content->d_name)) + 
data/mboxgrep-0.7.9/src/mh.c:113:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    (strlen (boxname)) + 2));
data/mboxgrep-0.7.9/src/mh.c:155: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).
	  s = strlen (buffer);
data/mboxgrep-0.7.9/src/scan.c:31: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).
# define NAMLEN(dirent) strlen((dirent)->d_name)
data/mboxgrep-0.7.9/src/scan.c:163:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			      (int) strlen (msg->headers), 0, 0, of, BUFSIZ);
data/mboxgrep-0.7.9/src/scan.c:166:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			      (int) strlen (msg->body), 0, 0, of, BUFSIZ);
data/mboxgrep-0.7.9/src/scan.c:241: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).
	      baz = strlen (msg->headers);
data/mboxgrep-0.7.9/src/scan.c:253: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).
	      baz = strlen(msg->body);
data/mboxgrep-0.7.9/src/scan.c:332:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    md5_process_bytes (body, strlen(body), &a);
data/mboxgrep-0.7.9/src/wrap.c:29: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).
# define NAMLEN(dirent) strlen((dirent)->d_name)

ANALYSIS SUMMARY:

Hits = 101
Lines analyzed = 4288 in approximately 0.13 seconds (32245 lines/second)
Physical Source Lines of Code (SLOC) = 2857
Hits@level = [0]  89 [1]  32 [2]  28 [3]  14 [4]  27 [5]   0
Hits@level+ = [0+] 190 [1+] 101 [2+]  69 [3+]  41 [4+]  27 [5+]   0
Hits/KSLOC@level+ = [0+] 66.5033 [1+] 35.3518 [2+] 24.1512 [3+] 14.3507 [4+] 9.45047 [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.