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/onak-0.6.1/openpgp.h
Examining data/onak-0.6.1/onak.h
Examining data/onak-0.6.1/sixdegrees.c
Examining data/onak-0.6.1/sha1.h
Examining data/onak-0.6.1/getcgi.h
Examining data/onak-0.6.1/decodekey.h
Examining data/onak-0.6.1/sigcheck.c
Examining data/onak-0.6.1/cleanup.c
Examining data/onak-0.6.1/sendsync.c
Examining data/onak-0.6.1/wordlist.c
Examining data/onak-0.6.1/stats.h
Examining data/onak-0.6.1/main.c
Examining data/onak-0.6.1/ll.c
Examining data/onak-0.6.1/keydb.h
Examining data/onak-0.6.1/wotsap.c
Examining data/onak-0.6.1/photoid.c
Examining data/onak-0.6.1/keystructs.h
Examining data/onak-0.6.1/onak.c
Examining data/onak-0.6.1/parsekey.c
Examining data/onak-0.6.1/cgi/lookup.c
Examining data/onak-0.6.1/cgi/gpgwww.c
Examining data/onak-0.6.1/cgi/hashquery.c
Examining data/onak-0.6.1/cgi/add.c
Examining data/onak-0.6.1/armor.h
Examining data/onak-0.6.1/keyindex.c
Examining data/onak-0.6.1/cleanup.h
Examining data/onak-0.6.1/mem.h
Examining data/onak-0.6.1/decodekey.c
Examining data/onak-0.6.1/merge.h
Examining data/onak-0.6.1/hash.h
Examining data/onak-0.6.1/rsa.c
Examining data/onak-0.6.1/sendsync.h
Examining data/onak-0.6.1/keyarray.c
Examining data/onak-0.6.1/wordlist.h
Examining data/onak-0.6.1/parsekey.h
Examining data/onak-0.6.1/cleankey.h
Examining data/onak-0.6.1/sha1.c
Examining data/onak-0.6.1/stripkey.c
Examining data/onak-0.6.1/cleankey.c
Examining data/onak-0.6.1/gpgstats-0.0.2/graphstuff.c
Examining data/onak-0.6.1/gpgstats-0.0.2/parse.c
Examining data/onak-0.6.1/gpgstats-0.0.2/parse.h
Examining data/onak-0.6.1/gpgstats-0.0.2/graphstuff.h
Examining data/onak-0.6.1/gpgstats-0.0.2/gpgstats.h
Examining data/onak-0.6.1/gpgstats-0.0.2/dotrees.c
Examining data/onak-0.6.1/gpgstats-0.0.2/gpgstats.c
Examining data/onak-0.6.1/sha1x.h
Examining data/onak-0.6.1/keyindex.h
Examining data/onak-0.6.1/keyid.h
Examining data/onak-0.6.1/stats.c
Examining data/onak-0.6.1/marshal.h
Examining data/onak-0.6.1/photoid.h
Examining data/onak-0.6.1/marshal.c
Examining data/onak-0.6.1/onak-conf.c
Examining data/onak-0.6.1/charfuncs.h
Examining data/onak-0.6.1/md5.h
Examining data/onak-0.6.1/ll.h
Examining data/onak-0.6.1/maxpath.c
Examining data/onak-0.6.1/onak-conf.h
Examining data/onak-0.6.1/sigcheck.h
Examining data/onak-0.6.1/keyid.c
Examining data/onak-0.6.1/hash.c
Examining data/onak-0.6.1/log.h
Examining data/onak-0.6.1/getcgi.c
Examining data/onak-0.6.1/sha1x.c
Examining data/onak-0.6.1/charfuncs.c
Examining data/onak-0.6.1/log.c
Examining data/onak-0.6.1/rsa.h
Examining data/onak-0.6.1/armor.c
Examining data/onak-0.6.1/mem.c
Examining data/onak-0.6.1/keyarray.h
Examining data/onak-0.6.1/splitkeys.c
Examining data/onak-0.6.1/keydb/keydb_pg.c
Examining data/onak-0.6.1/keydb/keyd.h
Examining data/onak-0.6.1/keydb/keydb_fs.c
Examining data/onak-0.6.1/keydb/keydb_dynamic.c
Examining data/onak-0.6.1/keydb/keydb_file.c
Examining data/onak-0.6.1/keydb/keyd.c
Examining data/onak-0.6.1/keydb/keydb_keyd.c
Examining data/onak-0.6.1/keydb/keydb_hkp.c
Examining data/onak-0.6.1/keydb/keydb_keyring.c
Examining data/onak-0.6.1/keydb/keydb_stacked.c
Examining data/onak-0.6.1/keydb/keydb_db4.c
Examining data/onak-0.6.1/keydb/keydb.c
Examining data/onak-0.6.1/keydb/keydctl.c
Examining data/onak-0.6.1/merge.c
Examining data/onak-0.6.1/md5.c

FINAL RESULTS:

data/onak-0.6.1/keydb/keydb_dynamic.c:263:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(soname, "./libkeydb_%s.so", type);
data/onak-0.6.1/keydb/keydb_dynamic.c:271:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(soname, "%s/libkeydb_%s.so", config.backends_dir,
data/onak-0.6.1/keydb/keydb_dynamic.c:291:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(initname, "keydb_%s_init", type);
data/onak-0.6.1/keydb/keydb_file.c:83:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(keyfile, 1023, "%s/0x%" PRIX64, db_dir,
data/onak-0.6.1/keydb/keydb_file.c:125:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(keyfile, 1023, "%s/0x%" PRIX64, db_dir,
data/onak-0.6.1/keydb/keydb_file.c:158:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(keyfile, 1023, "%s/0x%" PRIX64, db_dir,
data/onak-0.6.1/keydb/keydb_fs.c:81:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(buffer, length, "%s/key/%02X/%02X/%08X/%016" PRIX64,
data/onak-0.6.1/keydb/keydb_fs.c:123:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(buffer, length, "%s/words/%02X/%02X/%08X/%s/%016" PRIX64,
data/onak-0.6.1/keydb/keydb_fs.c:139:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(buffer, length, "%s/subkeys/%02X/%02X/%08X/%016" PRIX64,
data/onak-0.6.1/keydb/keydb_fs.c:679: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(dbcfg->location, R_OK | W_OK | X_OK) == -1) {
data/onak-0.6.1/keydb/keydb_hkp.c:187:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(keyurl, sizeof(keyurl),
data/onak-0.6.1/keyindex.c:489:4:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			printf("%016" PRIX64, keyid);
data/onak-0.6.1/log.c:151:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(logfile, format, ap);
data/onak-0.6.1/onak-conf.c:519:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(conffile, s "=%s\n", c); \
data/onak-0.6.1/onak-conf.c:521:26:  [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 WRITE_BOOL(c, s) fprintf(conffile, s "=%s\n", s ? "true" : "false");
data/onak-0.6.1/onak.c:112:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		snprintf(filename, 1023, state->filebase, state->filenum);
data/onak-0.6.1/sendsync.c:53:8:  [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.
			(fd=popen(config.mta, "w")) != NULL) {
data/onak-0.6.1/wotsap.c:92:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(tmppath, "%s/WOTVERSION", dir);
data/onak-0.6.1/wotsap.c:101:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(tmppath, "%s/README", dir);
data/onak-0.6.1/wotsap.c:113:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(tmppath, "%s/names", dir);
data/onak-0.6.1/wotsap.c:119:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(tmppath, "%s/keys", dir);
data/onak-0.6.1/wotsap.c:125:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(tmppath, "%s/signatures", dir);
data/onak-0.6.1/cgi/hashquery.c:55:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	request_method = getenv("REQUEST_METHOD");
data/onak-0.6.1/cgi/hashquery.c:60:31:  [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 (!(cgipostbuf.size = atoi(getenv("CONTENT_LENGTH")))) {
data/onak-0.6.1/getcgi.c:152:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	request_method = getenv("REQUEST_METHOD");
data/onak-0.6.1/getcgi.c:164:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		cgiinput=strdup(getenv("QUERY_STRING"));
data/onak-0.6.1/getcgi.c:166: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.
		if (getenv("CONTENT_TYPE") != NULL &&
data/onak-0.6.1/getcgi.c:167: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.
				strcasecmp(getenv("CONTENT_TYPE"),
data/onak-0.6.1/getcgi.c:173:31:  [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 (!(content_length = atoi(getenv("CONTENT_LENGTH")))) {
data/onak-0.6.1/keydb/keyd.c:633:20:  [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 ((optchar = getopt(argc, argv, "c:fh")) != -1 ) {
data/onak-0.6.1/keydb/keydctl.c:217:20:  [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 ((optchar = getopt(argc, argv, "c:h")) != -1 ) {
data/onak-0.6.1/maxpath.c:91:20:  [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 ((optchar = getopt(argc, argv, "c:")) != -1 ) {
data/onak-0.6.1/onak-conf.c:386:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		if ((dir = getenv("XDG_CONFIG_HOME")) != NULL) {
data/onak-0.6.1/onak-conf.c:400:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		} else if ((dir = getenv("HOME")) != NULL) {
data/onak-0.6.1/onak.c:184:20:  [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 ((optchar = getopt(argc, argv, "bc:efsuv")) != -1 ) {
data/onak-0.6.1/sixdegrees.c:142:20:  [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 ((optchar = getopt(argc, argv, "c:")) != -1 ) {
data/onak-0.6.1/wotsap.c:197:20:  [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 ((optchar = getopt(argc, argv, "c:")) != -1 ) {
data/onak-0.6.1/armor.c:212:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		armor_putchar_int(ctx, ((char *) c)[i]);
data/onak-0.6.1/armor.c:317:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		rc = dearmor_getchar(ctx, &((unsigned char *) c)[i]);
data/onak-0.6.1/cgi/hashquery.c:60:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	if (!(cgipostbuf.size = atoi(getenv("CONTENT_LENGTH")))) {
data/onak-0.6.1/cgi/lookup.c:179:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			indx = atoi(params[i+1]);
data/onak-0.6.1/charfuncs.c:41: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(c, &buf->buffer[buf->offset], count);
data/onak-0.6.1/charfuncs.c:72:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&buf->buffer[buf->offset], c, count);
data/onak-0.6.1/decodekey.c:296: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[1024];
data/onak-0.6.1/getcgi.c:37:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[1024];
data/onak-0.6.1/getcgi.c:173:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		if (!(content_length = atoi(getenv("CONTENT_LENGTH")))) {
data/onak-0.6.1/gpgstats-0.0.2/dotrees.c:72:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char curline[1024];
data/onak-0.6.1/gpgstats-0.0.2/dotrees.c:87:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((keyfile=fopen(filename, "r"))==NULL) {
data/onak-0.6.1/gpgstats-0.0.2/gpgstats.c:210: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 tmpstr[1024];
data/onak-0.6.1/gpgstats-0.0.2/gpgstats.c:254:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			printtrees(atoi(param));
data/onak-0.6.1/gpgstats-0.0.2/graphstuff.c:41: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 curline[1024];
data/onak-0.6.1/gpgstats-0.0.2/graphstuff.c:52:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((keyfile=fopen(filename, "r"))==NULL) {
data/onak-0.6.1/gpgstats-0.0.2/parse.c:41: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 command[CMDLEN], *pos=NULL;
data/onak-0.6.1/gpgstats-0.0.2/parse.c:83: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.
			case 1:	*((char **) commands[loop].var) = params;
data/onak-0.6.1/gpgstats-0.0.2/parse.c:88:44:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			case 3: *((int *) commands[loop].var) = atoi(params);
data/onak-0.6.1/gpgstats-0.0.2/parse.h:14: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 command[CMDLEN];
data/onak-0.6.1/keyarray.c:150: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 curline[1024];
data/onak-0.6.1/keyarray.c:154: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).
	fpfile = fopen(file, "r");
data/onak-0.6.1/keydb/keyd.c:627: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 sockname[100];
data/onak-0.6.1/keydb/keydb.c:51:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/onak-0.6.1/keydb/keydb_db4.c:176: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[1024];
data/onak-0.6.1/keydb/keydb_db4.c:183:16:  [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).
	lockfile_fd = open(buf, O_RDWR | O_CREAT | O_EXCL, 0600);
data/onak-0.6.1/keydb/keydb_db4.c:550: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(fingerprint.fp, data.data, data.size);
data/onak-0.6.1/keydb/keydb_db4.c:1445: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[1024];
data/onak-0.6.1/keydb/keydb_db4.c:1485: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).
	numdb = fopen(buf, "r");
data/onak-0.6.1/keydb/keydb_db4.c:1488:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			privctx->numdbs = atoi(buf);
data/onak-0.6.1/keydb/keydb_db4.c:1494: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).
		numdb = fopen(buf, "w");
data/onak-0.6.1/keydb/keydb_db4.c:1548:25:  [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).
		ret = privctx->dbenv->open(privctx->dbenv, dbcfg->location,
data/onak-0.6.1/keydb/keydb_db4.c:1566:27:  [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).
				ret = privctx->dbenv->open(privctx->dbenv,
data/onak-0.6.1/keydb/keydb_db4.c:1612:32:  [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).
				ret = privctx->dbconns[i]->open(
data/onak-0.6.1/keydb/keydb_db4.c:1644:26:  [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).
		ret = privctx->worddb->open(privctx->worddb, privctx->txn,
data/onak-0.6.1/keydb/keydb_db4.c:1669:26:  [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).
		ret = privctx->id32db->open(privctx->id32db, privctx->txn,
data/onak-0.6.1/keydb/keydb_db4.c:1694:26:  [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).
		ret = privctx->id64db->open(privctx->id64db, privctx->txn,
data/onak-0.6.1/keydb/keydb_db4.c:1715:29:  [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).
		ret = privctx->skshashdb->open(privctx->skshashdb, privctx->txn,
data/onak-0.6.1/keydb/keydb_db4.c:1737:28:  [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).
		ret = privctx->subkeydb->open(privctx->subkeydb, privctx->txn,
data/onak-0.6.1/keydb/keydb_file.c:80: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 keyfile[1024];
data/onak-0.6.1/keydb/keydb_file.c:85:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(keyfile, O_RDONLY); // | O_SHLOCK);
data/onak-0.6.1/keydb/keydb_file.c:117: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 keyfile[1024];
data/onak-0.6.1/keydb/keydb_file.c:127:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(keyfile, O_WRONLY | O_CREAT, 0664); // | O_EXLOCK);
data/onak-0.6.1/keydb/keydb_file.c:156: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 keyfile[1024];
data/onak-0.6.1/keydb/keydb_file.c:201:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char                        keyfile[1024];
data/onak-0.6.1/keydb/keydb_file.c:214: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).
				fd = open(keyfile, O_RDONLY);
data/onak-0.6.1/keydb/keydb_fs.c:99:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buffer[PATH_MAX];
data/onak-0.6.1/keydb/keydb_fs.c:212:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buffer[PATH_MAX];
data/onak-0.6.1/keydb/keydb_fs.c:260:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buffer[PATH_MAX];
data/onak-0.6.1/keydb/keydb_fs.c:271:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(buffer, O_RDONLY);
data/onak-0.6.1/keydb/keydb_fs.c:275:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(buffer, O_RDONLY);
data/onak-0.6.1/keydb/keydb_fs.c:303:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buffer[PATH_MAX];
data/onak-0.6.1/keydb/keydb_fs.c:304:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char wbuffer[PATH_MAX];
data/onak-0.6.1/keydb/keydb_fs.c:328:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	     open(buffer, O_WRONLY | (update ? O_TRUNC : O_CREAT),
data/onak-0.6.1/keydb/keydb_fs.c:408:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buffer[PATH_MAX];
data/onak-0.6.1/keydb/keydb_fs.c:485:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[PATH_MAX];
data/onak-0.6.1/keydb/keydb_fs.c:595:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buffer[PATH_MAX];
data/onak-0.6.1/keydb/keydb_fs.c:600: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(buffer, O_RDONLY)) != -1) {
data/onak-0.6.1/keydb/keydb_fs.c:660:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[PATH_MAX];
data/onak-0.6.1/keydb/keydb_fs.c:687:26:  [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).
		privctx->lockfile_fd = open(buffer, O_RDWR | O_CREAT, 0600);
data/onak-0.6.1/keydb/keydb_fs.c:698:25:  [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).
	privctx->lockfile_fd = open(buffer,
data/onak-0.6.1/keydb/keydb_fs.c:702:26:  [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).
		privctx->lockfile_fd = open(buffer, O_RDWR | O_CREAT, 0600);
data/onak-0.6.1/keydb/keydb_hkp.c:40: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 hkpbase[512];
data/onak-0.6.1/keydb/keydb_hkp.c:45:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char proto[6], host[256];
data/onak-0.6.1/keydb/keydb_hkp.c:155:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char keyurl[1024];
data/onak-0.6.1/keydb/keydb_hkp.c:170:10:  [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.
		ofs += sprintf(&keyurl[ofs], "%02X", fingerprint->fp[i]);
data/onak-0.6.1/keydb/keydb_hkp.c:185: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 keyurl[1024];
data/onak-0.6.1/keydb/keydb_hkp.c:209: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 keyurl[1024];
data/onak-0.6.1/keydb/keydb_hkp.c:232: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 keyurl[1024];
data/onak-0.6.1/keydb/keydb_keyring.c:402:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(dbcfg->location, O_RDONLY);
data/onak-0.6.1/keydb/keydb_pg.c:121: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 statement[1024];
data/onak-0.6.1/keydb/keydb_pg.c:149:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			key_oid = (Oid) atoi(oids);
data/onak-0.6.1/keydb/keydb_pg.c:194:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char statement[1024];
data/onak-0.6.1/keydb/keydb_pg.c:220:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			key_oid = (Oid) atoi(oids);
data/onak-0.6.1/keydb/keydb_pg.c:262: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 statement[1024];
data/onak-0.6.1/keydb/keydb_pg.c:286:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			key_oid = (Oid) atoi(oids);
data/onak-0.6.1/keydb/keydb_pg.c:346: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 statement[1024];
data/onak-0.6.1/keydb/keydb_pg.c:479: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 statement[1024];
data/onak-0.6.1/keydb/keydb_pg.c:525: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 statement[1024];
data/onak-0.6.1/keydb/keydb_pg.c:613:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			key_oid = (Oid) atoi(oids);
data/onak-0.6.1/keyindex.c:198: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[1024];
data/onak-0.6.1/keyindex.c:355: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[1024];
data/onak-0.6.1/log.c:193: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).
			logfile = fopen(logfilename, "a");
data/onak-0.6.1/md5.c:42: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/onak-0.6.1/md5.c:257: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/onak-0.6.1/md5.c:283: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/onak-0.6.1/md5.c:292: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/onak-0.6.1/md5.c:314:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    md5_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx);
data/onak-0.6.1/md5.c:332: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, length);
data/onak-0.6.1/md5.c:338: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/onak-0.6.1/md5.h:35: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/onak-0.6.1/mem.c:50: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(newpacket->data, packet->data,
data/onak-0.6.1/onak-conf.c:139:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		config.maxkeys = atoi(&line[15]);
data/onak-0.6.1/onak-conf.c:154:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		setlogthreshold(atoi(&line[9]));
data/onak-0.6.1/onak-conf.c:200:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char section[32] = "";
data/onak-0.6.1/onak-conf.c:264:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			setlogthreshold(atoi(value));
data/onak-0.6.1/onak-conf.c:271:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			config.maxkeys = atoi(value);
data/onak-0.6.1/onak-conf.c:367: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  curline[1024];
data/onak-0.6.1/onak-conf.c:391:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			conffile = fopen(conf, "r");
data/onak-0.6.1/onak-conf.c:395:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				conffile = fopen(conf, "r");
data/onak-0.6.1/onak-conf.c:405:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			conffile = fopen(conf, "r");
data/onak-0.6.1/onak-conf.c:409:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				conffile = fopen(conf, "r");
data/onak-0.6.1/onak-conf.c:416:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			conffile = fopen(CONFIGDIR "/onak.conf", "r");
data/onak-0.6.1/onak-conf.c:418:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				conffile = fopen(CONFIGDIR "/onak.ini", "r");
data/onak-0.6.1/onak-conf.c:432: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).
		conffile = fopen(configfile, "r");
data/onak-0.6.1/onak-conf.c:513: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).
		conffile = fopen(configfile, "w");
data/onak-0.6.1/onak.c:103:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char filename[1024];
data/onak-0.6.1/onak.c:113:15:  [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).
		state->fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0640);
data/onak-0.6.1/rsa.c:54:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, ripemd160_prefix, sizeof(ripemd160_prefix));
data/onak-0.6.1/rsa.c:55:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + sizeof(ripemd160_prefix), digest, RIPEMD160_DIGEST_SIZE);
data/onak-0.6.1/rsa.c:66:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, sha224_prefix, sizeof(sha224_prefix));
data/onak-0.6.1/rsa.c:67:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + sizeof(sha224_prefix), digest, SHA224_DIGEST_SIZE);
data/onak-0.6.1/rsa.c:78:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, sha384_prefix, sizeof(sha384_prefix));
data/onak-0.6.1/rsa.c:79:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + sizeof(sha384_prefix), digest, SHA384_DIGEST_SIZE);
data/onak-0.6.1/sha1.c:50:55:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 SHA1Transform(u_int32_t state[5], const unsigned char buffer[64])
data/onak-0.6.1/sha1.c:54:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char c[64];
data/onak-0.6.1/sha1.c:59:5:  [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(block, buffer, 64);
data/onak-0.6.1/sha1.c:131:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&ctx->buffer[j], data, (i = 64-j));
data/onak-0.6.1/sha1.c:139:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&ctx->buffer[j], &data[i], length - i);
data/onak-0.6.1/sha1.c:148:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 finalcount[8];
data/onak-0.6.1/sha1.h:18: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 buffer[64];
data/onak-0.6.1/sha1x.c:32: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 zeros[3];
data/onak-0.6.1/sha1x.h:33:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char result[SHA1X_DIGEST_SIZE];
data/onak-0.6.1/sigcheck.c:243: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(key->ed25519, &pk->data[ofs], 32);
data/onak-0.6.1/splitkeys.c:39:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char				 splitfile[1024];
data/onak-0.6.1/splitkeys.c:42:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		maxkeys = atoi(argv[1]);
data/onak-0.6.1/splitkeys.c:70: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).
			outfd = open(splitfile, O_WRONLY | O_CREAT, 0664);
data/onak-0.6.1/wotsap.c:93:9:  [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 = fopen(tmppath, "w");
data/onak-0.6.1/wotsap.c:102:9:  [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 = fopen(tmppath, "w");
data/onak-0.6.1/wotsap.c:114: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).
	names = fopen(tmppath, "w");
data/onak-0.6.1/wotsap.c:120:9:  [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).
	keys = fopen(tmppath, "wb");
data/onak-0.6.1/wotsap.c:126:9:  [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).
	sigs = fopen(tmppath, "wb");
data/onak-0.6.1/cgi/add.c:51: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).
			ctx.size = strlen(ctx.buffer);
data/onak-0.6.1/cgi/lookup.c:148: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 (search != NULL && strlen(search) == 42 &&
data/onak-0.6.1/cgi/lookup.c:159:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			} else if (search != NULL && strlen(search) == 66 &&
data/onak-0.6.1/charfuncs.c:83:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return !(read( *(int *) fd, c, count));
data/onak-0.6.1/getcgi.c:47:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, string, 1023);
data/onak-0.6.1/getcgi.c:48:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
		strncat(buf, "<", 1023 - strlen(buf));
data/onak-0.6.1/getcgi.c:48:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strncat(buf, "<", 1023 - strlen(buf));
data/onak-0.6.1/getcgi.c:56:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(buf, string, 1023 - strlen(buf));
data/onak-0.6.1/getcgi.c:56:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strncat(buf, string, 1023 - strlen(buf));
data/onak-0.6.1/getcgi.c:57:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
		strncat(buf, ">", 1023 - strlen(buf));
data/onak-0.6.1/getcgi.c:57:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strncat(buf, ">", 1023 - strlen(buf));
data/onak-0.6.1/getcgi.c:68:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(buf, string, 1023 - strlen(buf));
data/onak-0.6.1/getcgi.c:68: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).
	strncat(buf, string, 1023 - strlen(buf));
data/onak-0.6.1/getcgi.c:160:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	} else if (strlen(request_method)==0) {
data/onak-0.6.1/gpgstats-0.0.2/dotrees.c:28: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).
	for (loop = 0; loop < 8 && loop < strlen(string) && string[loop] > ' ';
data/onak-0.6.1/gpgstats-0.0.2/dotrees.c:126:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				curkey->name[strlen(curkey->name)-1]=0;
data/onak-0.6.1/gpgstats-0.0.2/gpgstats.c:121: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).
			names+=strlen(((struct key *)curkey->object)->name);
data/onak-0.6.1/gpgstats-0.0.2/parse.c:44: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).
	if (commands==NULL || commandline==NULL || strlen(commandline)==0) return 0;
data/onak-0.6.1/gpgstats-0.0.2/parse.c:50: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).
	while (params[strlen(params)-1]<' ') params[strlen(params)-1]=0;
data/onak-0.6.1/gpgstats-0.0.2/parse.c:50:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	while (params[strlen(params)-1]<' ') params[strlen(params)-1]=0;
data/onak-0.6.1/gpgstats-0.0.2/parse.c:54:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(params)>=CMDLEN) {
data/onak-0.6.1/gpgstats-0.0.2/parse.c:59:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(command, params, CMDLEN);
data/onak-0.6.1/gpgstats-0.0.2/parse.c:61: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).
		memmove(params, pos+1, strlen(commandline)-strlen(params));
data/onak-0.6.1/gpgstats-0.0.2/parse.c:61:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memmove(params, pos+1, strlen(commandline)-strlen(params));
data/onak-0.6.1/gpgstats-0.0.2/parse.c:63:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(params)>=CMDLEN) {
data/onak-0.6.1/gpgstats-0.0.2/parse.c:68:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(command, params, CMDLEN);
data/onak-0.6.1/gpgstats-0.0.2/parse.c:72:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	while (strlen(commands[loop].command)>0 && strcasecmp(command, commands[loop].command)!=0) {
data/onak-0.6.1/gpgstats-0.0.2/parse.c:76: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(commands[loop].command)==0) {
data/onak-0.6.1/keyarray.c:164: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).
			for (i = strlen(curline) - 1;
data/onak-0.6.1/keydb/keyd.c:226:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(sock.sun_path, sockname,
data/onak-0.6.1/keydb/keyd.c:269:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(fd, &cmd, sizeof(cmd));
data/onak-0.6.1/keydb/keyd.c:308:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if ((read(fd, &bytes, 1) != 1) ||
data/onak-0.6.1/keydb/keyd.c:313:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					bytes = read(fd, fingerprint.fp,
data/onak-0.6.1/keydb/keyd.c:343:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(fd, &keyid, sizeof(keyid));
data/onak-0.6.1/keydb/keyd.c:372:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if ((read(fd, &bytes, 1) != 1) ||
data/onak-0.6.1/keydb/keyd.c:377:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					bytes = read(fd, fingerprint.fp,
data/onak-0.6.1/keydb/keyd.c:407:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(fd, &count, sizeof(count));
data/onak-0.6.1/keydb/keyd.c:414:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(fd, search, count);
data/onak-0.6.1/keydb/keyd.c:444:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(fd, &storebuf.size,
data/onak-0.6.1/keydb/keyd.c:457:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					bytes = read(fd,
data/onak-0.6.1/keydb/keyd.c:486:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(fd, &fingerprint,
data/onak-0.6.1/keydb/keyd.c:549:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(fd, hash.hash, sizeof(hash.hash));
data/onak-0.6.1/keydb/keydb_db4.c:195: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).
	written = write(lockfile_fd, buf, strlen(buf));
data/onak-0.6.1/keydb/keydb_db4.c:197: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).
	if (written != strlen(buf)) {
data/onak-0.6.1/keydb/keydb_db4.c:539: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).
		key.size = strlen(curword->object);
data/onak-0.6.1/keydb/keydb_db4.c:721: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).
			key.size = strlen(key.data);
data/onak-0.6.1/keydb/keydb_db4.c:1106: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).
			key.size = strlen(key.data);
data/onak-0.6.1/keydb/keydb_dynamic.c:258:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		soname = malloc(strlen(type)
data/onak-0.6.1/keydb/keydb_dynamic.c:259:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			+ strlen("./libkeydb_")
data/onak-0.6.1/keydb/keydb_dynamic.c:260:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			+ strlen(".so")
data/onak-0.6.1/keydb/keydb_dynamic.c:265:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		soname = malloc(strlen(type)
data/onak-0.6.1/keydb/keydb_dynamic.c:266:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			+ strlen("/libkeydb_")
data/onak-0.6.1/keydb/keydb_dynamic.c:267:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			+ strlen(".so")
data/onak-0.6.1/keydb/keydb_dynamic.c:268:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			+ strlen(config.backends_dir)
data/onak-0.6.1/keydb/keydb_dynamic.c:287: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).
	initname = malloc(strlen(config.db_backend)
data/onak-0.6.1/keydb/keydb_dynamic.c:288:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			+ strlen("keydb_")
data/onak-0.6.1/keydb/keydb_dynamic.c:289:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			+ strlen("_init")
data/onak-0.6.1/keydb/keydb_fs.c:67:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	register uint32_t n = strlen((char *) ptr);
data/onak-0.6.1/keydb/keydb_fs.c:190:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(100);
data/onak-0.6.1/keydb/keydb_keyd.c:74:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(fd, &cmd, sizeof(cmd));
data/onak-0.6.1/keydb/keydb_keyd.c:116:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(keyd_fd, &keybuf.size, sizeof(keybuf.size));
data/onak-0.6.1/keydb/keydb_keyd.c:124:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(keyd_fd, &keybuf.buffer[count],
data/onak-0.6.1/keydb/keydb_keyd.c:165:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(keyd_fd, &keybuf.size, sizeof(keybuf.size));
data/onak-0.6.1/keydb/keydb_keyd.c:173:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(keyd_fd, &keybuf.buffer[count],
data/onak-0.6.1/keydb/keydb_keyd.c:207:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(keyd_fd, &keybuf.size, sizeof(keybuf.size));
data/onak-0.6.1/keydb/keydb_keyd.c:215:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(keyd_fd, &keybuf.buffer[count],
data/onak-0.6.1/keydb/keydb_keyd.c:336: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).
		bytes = strlen(search);
data/onak-0.6.1/keydb/keydb_keyd.c:340:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(keyd_fd, &keybuf.size, sizeof(keybuf.size));
data/onak-0.6.1/keydb/keydb_keyd.c:348:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(keyd_fd, &keybuf.buffer[count],
data/onak-0.6.1/keydb/keydb_keyd.c:383:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(keyd_fd, &keybuf.size, sizeof(keybuf.size));
data/onak-0.6.1/keydb/keydb_keyd.c:391:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(keyd_fd, &keybuf.buffer[count],
data/onak-0.6.1/keydb/keydb_keyd.c:436:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(keyd_fd, &keybuf.size, sizeof(keybuf.size));
data/onak-0.6.1/keydb/keydb_keyd.c:444:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(keyd_fd, &keybuf.buffer[count],
data/onak-0.6.1/keydb/keydb_keyd.c:468:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(keyd_fd, &keybuf.size, sizeof(keybuf.size));
data/onak-0.6.1/keydb/keydb_keyd.c:498:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(keyd_fd, &cmd, sizeof(cmd)) != sizeof(cmd)) {
data/onak-0.6.1/keydb/keydb_keyd.c:574:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		count = read(keyd_fd, &reply, sizeof(reply));
data/onak-0.6.1/keydb/keydb_keyd.c:576:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			count = read(keyd_fd, &reply, sizeof(reply));
data/onak-0.6.1/keydb/keydb_keyd.c:585:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			count = read(keyd_fd, &reply, sizeof(reply));
data/onak-0.6.1/keydb/keydb_pg.c:204: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).
	newsearch = malloc(strlen(search) * 2 + 1);
data/onak-0.6.1/keydb/keydb_pg.c:205:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memset(newsearch, 0, strlen(search) * 2 + 1);
data/onak-0.6.1/keydb/keydb_pg.c:206: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).
	PQescapeStringConn(dbconn, newsearch, search, strlen(search), NULL);
data/onak-0.6.1/keydb/keydb_pg.c:412: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).
			safeuid = malloc(strlen(uids[i]) * 2 + 1);
data/onak-0.6.1/keydb/keydb_pg.c:414:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				memset(safeuid, 0, strlen(uids[i]) * 2 + 1);
data/onak-0.6.1/keydb/keydb_pg.c:416:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						strlen(uids[i]), NULL);
data/onak-0.6.1/keydb/keydctl.c:53:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	} else if (read(keyd_fd, &tmp, sizeof(tmp)) != sizeof(tmp)) {
data/onak-0.6.1/keydb/keydctl.c:65:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	} else if (read(keyd_fd, &tmp, sizeof(tmp)) != sizeof(tmp)) {
data/onak-0.6.1/keydb/keydctl.c:77:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return read(keyd_fd, buf, tmp);
data/onak-0.6.1/keyid.c:328: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(search);
data/onak-0.6.1/marshal.c:98: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(string);
data/onak-0.6.1/onak-conf.c:212:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(line);
data/onak-0.6.1/onak-conf.c:226:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(section, &line[1], len);
data/onak-0.6.1/onak-conf.c:388:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len = strlen(dir) + 1 + 9 + 1;
data/onak-0.6.1/onak-conf.c:402:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len = strlen(dir) + 18 + 1;
data/onak-0.6.1/onak-conf.c:428:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(configfile);
data/onak-0.6.1/onak-conf.c:458: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).
			for (i = strlen(curline) - 1;
data/onak-0.6.1/onak.c:344: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).
		if (search != NULL && strlen(search) == 42 &&
data/onak-0.6.1/onak.c:354: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).
		} else if (search != NULL && strlen(search) == 66 &&
data/onak-0.6.1/wotsap.c:86:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	tmppath = malloc(strlen(dir) + 12);

ANALYSIS SUMMARY:

Hits = 266
Lines analyzed = 20065 in approximately 0.54 seconds (37047 lines/second)
Physical Source Lines of Code (SLOC) = 13548
Hits@level = [0] 238 [1]  98 [2] 131 [3]  15 [4]  22 [5]   0
Hits@level+ = [0+] 504 [1+] 266 [2+] 168 [3+]  37 [4+]  22 [5+]   0
Hits/KSLOC@level+ = [0+] 37.2011 [1+] 19.6339 [2+] 12.4004 [3+] 2.73103 [4+] 1.62386 [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.