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/lurker-2.3/index/main.cpp
Examining data/lurker-2.3/index/getdate.cpp
Examining data/lurker-2.3/index/search.cpp
Examining data/lurker-2.3/index/params.cpp
Examining data/lurker-2.3/index/list.cpp
Examining data/lurker-2.3/index/getdate.h
Examining data/lurker-2.3/index/Index.cpp
Examining data/lurker-2.3/index/lurker-drop-rlimit.cpp
Examining data/lurker-2.3/index/Index.h
Examining data/lurker-2.3/render/bounce.cpp
Examining data/lurker-2.3/render/commands.h
Examining data/lurker-2.3/render/search.cpp
Examining data/lurker-2.3/render/Threading.h
Examining data/lurker-2.3/render/quote.cpp
Examining data/lurker-2.3/render/splash.cpp
Examining data/lurker-2.3/render/Cache.cpp
Examining data/lurker-2.3/render/Cache.h
Examining data/lurker-2.3/render/thread.cpp
Examining data/lurker-2.3/render/list.cpp
Examining data/lurker-2.3/render/mbox.cpp
Examining data/lurker-2.3/render/mailto.cpp
Examining data/lurker-2.3/render/zap.cpp
Examining data/lurker-2.3/render/jump.cpp
Examining data/lurker-2.3/render/parse.h
Examining data/lurker-2.3/render/Threading.cpp
Examining data/lurker-2.3/render/attach.cpp
Examining data/lurker-2.3/render/art.cpp
Examining data/lurker-2.3/render/keyword.cpp
Examining data/lurker-2.3/render/url.cpp
Examining data/lurker-2.3/render/mindex.cpp
Examining data/lurker-2.3/render/message.cpp
Examining data/lurker-2.3/render/parse.cpp
Examining data/lurker-2.3/render/main.cpp
Examining data/lurker-2.3/common/Summary.h
Examining data/lurker-2.3/common/ConfigFile.cpp
Examining data/lurker-2.3/common/XmlEscape.h
Examining data/lurker-2.3/common/MessageId.h
Examining data/lurker-2.3/common/CharsetEscape.cpp
Examining data/lurker-2.3/common/XmlEscape.cpp
Examining data/lurker-2.3/common/md5.cpp
Examining data/lurker-2.3/common/Search.h
Examining data/lurker-2.3/common/ConfigFile.h
Examining data/lurker-2.3/common/Summary.cpp
Examining data/lurker-2.3/common/MessageId.cpp
Examining data/lurker-2.3/common/md5.h
Examining data/lurker-2.3/common/Keys.h
Examining data/lurker-2.3/common/Thread.cpp
Examining data/lurker-2.3/common/Keys.cpp
Examining data/lurker-2.3/common/Search.cpp
Examining data/lurker-2.3/common/CharsetEscape.h
Examining data/lurker-2.3/libesort/Master.cpp
Examining data/lurker-2.3/libesort/esort.h
Examining data/lurker-2.3/libesort/DbMan.h
Examining data/lurker-2.3/libesort/Failer.h
Examining data/lurker-2.3/libesort/Transaction.cpp
Examining data/lurker-2.3/libesort/dump.cpp
Examining data/lurker-2.3/libesort/File.h
Examining data/lurker-2.3/libesort/Merger.cpp
Examining data/lurker-2.3/libesort/Source.h
Examining data/lurker-2.3/libesort/Memory.h
Examining data/lurker-2.3/libesort/View.h
Examining data/lurker-2.3/libesort/Master.h
Examining data/lurker-2.3/libesort/Transaction.h
Examining data/lurker-2.3/libesort/Merger.h
Examining data/lurker-2.3/libesort/DbMan.cpp
Examining data/lurker-2.3/libesort/Parameters.cpp
Examining data/lurker-2.3/libesort/Failer.cpp
Examining data/lurker-2.3/libesort/File.cpp
Examining data/lurker-2.3/libesort/Memory.cpp
Examining data/lurker-2.3/libesort/View.cpp
Examining data/lurker-2.3/libesort/Source.cpp
Examining data/lurker-2.3/libesort/io.h
Examining data/lurker-2.3/prune/PTable.h
Examining data/lurker-2.3/prune/search.cpp
Examining data/lurker-2.3/prune/splash.cpp
Examining data/lurker-2.3/prune/thread.cpp
Examining data/lurker-2.3/prune/list.cpp
Examining data/lurker-2.3/prune/mbox.cpp
Examining data/lurker-2.3/prune/PTable.cpp
Examining data/lurker-2.3/prune/attach.cpp
Examining data/lurker-2.3/prune/mindex.cpp
Examining data/lurker-2.3/prune/prune.cpp
Examining data/lurker-2.3/prune/message.cpp

FINAL RESULTS:

data/lurker-2.3/common/Keys.cpp:80: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(&out[0], prefix);
data/lurker-2.3/index/getdate.cpp:829:21:  [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 YYFPRINTF fprintf
data/lurker-2.3/index/lurker-drop-rlimit.cpp:14:2:  [4] (shell) execv:
  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.
	execv(argv[1], argv+1);	
data/lurker-2.3/render/Cache.cpp:133:12:  [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.
		output = popen(command.c_str(), "w");
data/lurker-2.3/render/message.cpp:281:14:  [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.
	FILE* pgp = popen(command.c_str(), "r");
data/lurker-2.3/render/message.cpp:318: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(photo.c_str(), R_OK) == 0)
data/lurker-2.3/render/zap.cpp:101:12:  [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.
	FILE* f = popen(cmd.c_str(), "w");
data/lurker-2.3/common/ConfigFile.cpp:63:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(path.c_str(), clean) != 0)
data/lurker-2.3/common/ConfigFile.cpp:74:7:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		if (realpath(dir.c_str(), clean) != 0)
data/lurker-2.3/index/Index.cpp:304: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.
		hash[0] = random() % 256;
data/lurker-2.3/index/Index.cpp:305: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.
		hash[1] = random() % 256;
data/lurker-2.3/index/Index.cpp:306: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.
		hash[2] = random() % 256;
data/lurker-2.3/index/Index.cpp:307: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.
		hash[3] = random() % 256;
data/lurker-2.3/index/list.cpp:75:14:  [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 ((c = getopt(argc, (char*const*)argv, "c:f:igtaldso?")) != -1)
data/lurker-2.3/index/main.cpp:556: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(time(0));
data/lurker-2.3/index/main.cpp:558:14:  [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 ((c = getopt(argc, (char*const*)argv, "c:l:i:p:mvndfu?")) != -1)
data/lurker-2.3/index/params.cpp:83:14:  [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 ((c = getopt(argc, (char*const*)argv, "c:f:duanexmikwhr?")) != -1)
data/lurker-2.3/index/search.cpp:79:14:  [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 ((c = getopt(argc, (char*const*)argv, "c:k:dvfiq?")) != -1)
data/lurker-2.3/libesort/DbMan.cpp:385:19:  [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.
		ext[1] = 'a' + (random() % 26);
data/lurker-2.3/libesort/DbMan.cpp:386:19:  [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.
		ext[2] = 'a' + (random() % 26);
data/lurker-2.3/prune/prune.cpp:182: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(time(0));
data/lurker-2.3/prune/prune.cpp:184:14:  [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 ((c = getopt(argc, (char*const*)argv, "c:f:m:a:vp?")) != -1)
data/lurker-2.3/render/main.cpp:150:13:  [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 ((tmp = getenv("SERVER_NAME" )) != 0) host     = tmp;
data/lurker-2.3/render/main.cpp:151:13:  [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 ((tmp = getenv("SERVER_PORT" )) != 0) port     = tmp;
data/lurker-2.3/render/main.cpp:152:13:  [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 ((tmp = getenv("SCRIPT_NAME" )) != 0) cgipath  = tmp;
data/lurker-2.3/render/main.cpp:154:13:  [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 ((tmp = getenv("HTTPS"       )) != 0) https    = tmp;
data/lurker-2.3/render/main.cpp:157:13:  [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 ((tmp = getenv("REDIRECT_URL")) != 0) request  = tmp;
data/lurker-2.3/render/main.cpp:159:13:  [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 ((tmp = getenv("REQUEST_URI" )) != 0) request  = tmp;
data/lurker-2.3/render/main.cpp:162:13:  [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 ((tmp = getenv("REDIRECT_LURKER_CONFIG"))   != 0) config = tmp;
data/lurker-2.3/render/main.cpp:163:13:  [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 ((tmp = getenv("LURKER_CONFIG"))            != 0) config = tmp;
data/lurker-2.3/render/main.cpp:165:13:  [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 ((tmp = getenv("REDIRECT_LURKER_FRONTEND")) != 0) document = tmp;
data/lurker-2.3/render/main.cpp:166:13:  [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 ((tmp = getenv("LURKER_FRONTEND"))          != 0) document = tmp;
data/lurker-2.3/render/parse.cpp:89:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char* x = getenv("QUERY_STRING");
data/lurker-2.3/render/parse.cpp:114:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char* x = getenv("HTTP_COOKIE");
data/lurker-2.3/common/CharsetEscape.cpp:93: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[8096];
data/lurker-2.3/common/ConfigFile.cpp:61: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 clean[PATH_MAX];
data/lurker-2.3/common/ConfigFile.cpp:1135: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 year[40];
data/lurker-2.3/common/Keys.cpp:40: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 my_keyword_is_split[256];
data/lurker-2.3/common/Keys.cpp:47: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 my_keyword_is_div[256];
data/lurker-2.3/common/Keys.cpp:53: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 my_keyword_conv[256];
data/lurker-2.3/common/Keys.cpp:68: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 out[LU_KEYWORD_LEN+1];
data/lurker-2.3/common/MessageId.cpp:139: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[26];
data/lurker-2.3/common/MessageId.h:39: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 time_[4];
data/lurker-2.3/common/MessageId.h:40: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 hash_[4];
data/lurker-2.3/common/MessageId.h:111:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 tmp[8];
data/lurker-2.3/common/Summary.cpp:139:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open(name.c_str(), O_RDONLY);
data/lurker-2.3/common/Summary.cpp:157: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[8192];
data/lurker-2.3/common/Thread.cpp:203: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 sbj[LU_SQUISHY_MAX];
data/lurker-2.3/common/Thread.cpp:207: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 buf[16];
data/lurker-2.3/common/Thread.cpp:213: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 xord[4];
data/lurker-2.3/common/Thread.cpp:219: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 code[9];
data/lurker-2.3/common/md5.cpp:100: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((md5byte *)ctx->in + 64 - t, buf, len);
data/lurker-2.3/common/md5.cpp:104: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((md5byte *)ctx->in + 64 - t, buf, t);
data/lurker-2.3/common/md5.cpp:112: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->in, buf, 64);
data/lurker-2.3/common/md5.cpp:120: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->in, buf, len);
data/lurker-2.3/common/md5.cpp:155: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(digest, ctx->buf, 16);
data/lurker-2.3/common/md5.h:63:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void MD5Final(unsigned char digest[16], struct MD5Context *context);
data/lurker-2.3/index/Index.cpp:234: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 buf[16];
data/lurker-2.3/index/Index.cpp:259: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 hash[4];
data/lurker-2.3/index/Index.cpp:387: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 buf[12];
data/lurker-2.3/index/Index.cpp:423: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 hash[4];
data/lurker-2.3/index/getdate.cpp:1126: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.
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/lurker-2.3/index/getdate.cpp:1143: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.
      char yyformat[sizeof yyunexpected
data/lurker-2.3/index/getdate.cpp:1311:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char yymsgbuf[128];
data/lurker-2.3/index/getdate.cpp:2511: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 buff[20];
data/lurker-2.3/index/getdate.cpp:2780: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 buff[BUFSIZ];
data/lurker-2.3/index/main.cpp:245: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 prefix[100];
data/lurker-2.3/index/main.cpp:287: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[4096];
data/lurker-2.3/index/main.cpp:461: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 sect[8192];
data/lurker-2.3/index/main.cpp:527: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* f = fopen(iname.c_str(), "rb");
data/lurker-2.3/index/main.cpp:653:9:  [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).
	mbox = open(mboxf.c_str(), O_RDWR|O_CREAT, 0666);
data/lurker-2.3/index/main.cpp:715: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).
			FILE* f = fopen(input, "rb");
data/lurker-2.3/libesort/DbMan.cpp:112: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[10240];
data/lurker-2.3/libesort/DbMan.cpp: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 id[80];
data/lurker-2.3/libesort/DbMan.cpp:179:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int fd = open(name.c_str(), O_RDONLY);
data/lurker-2.3/libesort/DbMan.cpp:195:11:  [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).
	dbfile = fopen(dbname.c_str(), "r");
data/lurker-2.3/libesort/DbMan.cpp:235:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open(dbname.c_str(), O_RDWR | O_CREAT, cmode);
data/lurker-2.3/libesort/DbMan.cpp:241: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).
	dirfd = open(dirname.c_str(), O_RDONLY);
data/lurker-2.3/libesort/DbMan.cpp:318:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	dblock = open(name.c_str(), O_RDWR | O_CREAT, cmode);
data/lurker-2.3/libesort/DbMan.cpp:379: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 ext[4];
data/lurker-2.3/libesort/DbMan.cpp:390:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open(name.c_str(), O_RDWR | O_CREAT | O_TRUNC, cmode);
data/lurker-2.3/libesort/File.cpp:203: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(scratch+thisDup, r, thisDelta);
data/lurker-2.3/libesort/File.cpp:204: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(tailw, scratch+nextDup, wDelta);
data/lurker-2.3/libesort/Transaction.cpp:99: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(off, key+dup, fragment);
data/lurker-2.3/prune/attach.cpp:43:3:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		atol(ks->first.c_str()+skip) &&	// a number precedes it
data/lurker-2.3/prune/prune.cpp:77:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open(docfile.c_str(), O_RDWR | O_CREAT, 0666);
data/lurker-2.3/prune/prune.cpp:195:17:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			modifyTime = atol(optarg)*60*60*24;
data/lurker-2.3/prune/prune.cpp:203:17:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			accessTime = atol(optarg)*60*60*24;
data/lurker-2.3/render/Cache.cpp:49: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[128]; //8192];
data/lurker-2.3/render/Cache.cpp:116:11:  [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).
		cache = fopen(parameter.c_str(), "w+");
data/lurker-2.3/render/Cache.cpp:129: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[10] = "";
data/lurker-2.3/render/Cache.cpp:130:24:  [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.
		if (cache != stdout) sprintf(buf, " >&%d", fileno(cache));
data/lurker-2.3/render/Cache.cpp:188: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[4096];
data/lurker-2.3/render/attach.cpp:90:11:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	long n = atol(param.c_str());
data/lurker-2.3/render/jump.cpp:40:16:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_sec  = atol(args["sec" ].c_str());
data/lurker-2.3/render/jump.cpp:41:16:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_min  = atol(args["min" ].c_str());
data/lurker-2.3/render/jump.cpp:42:16:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_hour = atol(args["hour"].c_str());
data/lurker-2.3/render/jump.cpp:43:16:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_mday = atol(args["mday"].c_str());
data/lurker-2.3/render/jump.cpp:44:16:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_mon  = atol(args["mon" ].c_str()) - 1;
data/lurker-2.3/render/jump.cpp:45:16:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_year = atol(args["year"].c_str()) - 1900;
data/lurker-2.3/render/jump.cpp:47:15:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	time_t utc = atol(args["utc"].c_str());
data/lurker-2.3/render/jump.cpp: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 buf[26];
data/lurker-2.3/render/keyword.cpp:60:50:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_sec  = args.find("sec" ) != args.end() ? atol(args["sec" ].c_str()) : 0;
data/lurker-2.3/render/keyword.cpp:61:50:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_min  = args.find("min" ) != args.end() ? atol(args["min" ].c_str()) : 0;
data/lurker-2.3/render/keyword.cpp:62:50:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_hour = args.find("hour") != args.end() ? atol(args["hour"].c_str()) : 0;
data/lurker-2.3/render/keyword.cpp:63:50:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_mday = args.find("mday") != args.end() ? atol(args["mday"].c_str()) : 1;
data/lurker-2.3/render/keyword.cpp:64:50:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_mon  = args.find("mon" ) != args.end() ? atol(args["mon" ].c_str()) - 1 : 0;
data/lurker-2.3/render/keyword.cpp:65:50:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tms.tm_year = args.find("year") != args.end() ? atol(args["year"].c_str()) - 1900 : 138;
data/lurker-2.3/render/keyword.cpp:67:15:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	time_t utc = atol(args["utc"].c_str());
data/lurker-2.3/render/keyword.cpp:70:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[26];
data/lurker-2.3/render/message.cpp:250: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[10];
data/lurker-2.3/render/message.cpp:251:2:  [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, "%d", pgp_part);
data/lurker-2.3/render/message.cpp:284: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[1024];
data/lurker-2.3/render/parse.cpp:138:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 tbl[17] = "0123456789ABCDEF";
data/lurker-2.3/render/zap.cpp:55:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errbuf[80];
data/lurker-2.3/render/zap.cpp:109: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(errbuf, "error %d", ret);
data/lurker-2.3/common/CharsetEscape.h:65: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).
 		write(o, s, strlen(s));
data/lurker-2.3/common/CharsetEscape.h:69: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).
 		return write(s, strlen(s));
data/lurker-2.3/common/ConfigFile.cpp:1045:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				int len = strlen(e->d_name);
data/lurker-2.3/common/Keys.cpp:81: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).
		w = &out[strlen(prefix)];
data/lurker-2.3/common/MessageId.cpp:86: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(str) > 14 && str[8] == '.')
data/lurker-2.3/common/MessageId.cpp:124: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(str) > 23 && str[15] == '.')
data/lurker-2.3/common/Thread.cpp:210: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).
	MD5Update(&ctx, (unsigned char*)sbj, strlen(sbj));
data/lurker-2.3/index/Index.cpp:232:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	MD5Update(&ctx, (const unsigned char*)str, strlen(str));
data/lurker-2.3/index/getdate.cpp:1007: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).
#   define yystrlen strlen
data/lurker-2.3/index/getdate.cpp:2419: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).
  wordlen = strlen (word);
data/lurker-2.3/index/main.cpp:292:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		stream.avail_in  = strlen(&prefix[0]);
data/lurker-2.3/index/main.cpp:340: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).
		crc = crc32(crc, (unsigned char*)prefix, strlen(prefix));
data/lurker-2.3/index/main.cpp:348: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).
		unsigned long len = msg.length() + strlen(prefix);
data/lurker-2.3/index/main.cpp:362: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).
	        start, msg.length() + strlen(prefix));
data/lurker-2.3/index/main.cpp:637:26:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	if (cfg.db_umask != -1) umask(cfg.db_umask);
data/lurker-2.3/index/search.cpp:130:27:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		if (cfg.db_umask != -1) umask(cfg.db_umask);
data/lurker-2.3/libesort/File.cpp:108:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(f->fd, buf, f->p->blockSize()) != (ssize_t)f->p->blockSize())

ANALYSIS SUMMARY:

Hits = 133
Lines analyzed = 34469 in approximately 0.77 seconds (44549 lines/second)
Physical Source Lines of Code (SLOC) = 28827
Hits@level = [0]  17 [1]  17 [2]  82 [3]  27 [4]   7 [5]   0
Hits@level+ = [0+] 150 [1+] 133 [2+] 116 [3+]  34 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 5.20346 [1+] 4.61373 [2+] 4.02401 [3+] 1.17945 [4+] 0.242828 [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.