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/srg-1.3.6/include/UserReport.h
Examining data/srg-1.3.6/include/Report.h
Examining data/srg-1.3.6/include/LocationReport.h
Examining data/srg-1.3.6/include/srg.h
Examining data/srg-1.3.6/include/debug.h
Examining data/srg-1.3.6/include/md5.h
Examining data/srg-1.3.6/include/prototypes.h
Examining data/srg-1.3.6/include/SiteReport.h
Examining data/srg-1.3.6/libconfig/config.parser.c
Examining data/srg-1.3.6/libconfig/config.lexer.c
Examining data/srg-1.3.6/libconfig/libconfig.c
Examining data/srg-1.3.6/libconfig/config.parser.h
Examining data/srg-1.3.6/libconfig/config_internal.h
Examining data/srg-1.3.6/libconfig/libconfig.h
Examining data/srg-1.3.6/src/ip2user.cc
Examining data/srg-1.3.6/src/filterSites.cc
Examining data/srg-1.3.6/src/parseURL.cc
Examining data/srg-1.3.6/src/configuration.cc
Examining data/srg-1.3.6/src/utils.cc
Examining data/srg-1.3.6/src/md5.c
Examining data/srg-1.3.6/src/main.cc
Examining data/srg-1.3.6/src/output.cc
Examining data/srg-1.3.6/src/Report.cc
Examining data/srg-1.3.6/src/SiteReport.cc
Examining data/srg-1.3.6/src/UserReport.cc
Examining data/srg-1.3.6/src/LocationReport.cc

FINAL RESULTS:

data/srg-1.3.6/libconfig/config.parser.c:635: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/srg-1.3.6/src/configuration.cc:207: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(conffile, R_OK)!=0) {
data/srg-1.3.6/src/main.cc:254:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(&work[0], "%s", srg.accessLog);
data/srg-1.3.6/src/main.cc:1173: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 (file_name,dirname);
data/srg-1.3.6/src/main.cc:1175:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat (file_name,direntp->d_name);
data/srg-1.3.6/src/output.cc:39:9:  [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(srg.resourceDir, R_OK)!=0) {
data/srg-1.3.6/src/utils.cc:498:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	rv = access(tfilename, R_OK);
data/srg-1.3.6/src/configuration.cc:138:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while((ch = getopt_long(argc, argv, "C:df:hHm:Mo:O:t:vV", long_options, 
data/srg-1.3.6/libconfig/config.lexer.c:796:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
{ yylval.i=atoi(yytext); return TOK_INTEGER; }
data/srg-1.3.6/libconfig/config.parser.c:935: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/srg-1.3.6/libconfig/config.parser.c:952: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/srg-1.3.6/libconfig/config.parser.c:1142: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/srg-1.3.6/libconfig/libconfig.c:56: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).
  yyin = fopen(filename,"r");
data/srg-1.3.6/src/LocationReport.cc:94:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	outfile = fopen(filename, "w");
data/srg-1.3.6/src/LocationReport.cc:154: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 tmp[31];
data/srg-1.3.6/src/SiteReport.cc:92:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	outfile = fopen(filename, "w");
data/srg-1.3.6/src/SiteReport.cc:244: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 tmpname[41];
data/srg-1.3.6/src/SiteReport.cc:252: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 tmpname[41];
data/srg-1.3.6/src/UserReport.cc:122:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	outfile = fopen(filename, "w");
data/srg-1.3.6/src/configuration.cc:159:14:  [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).
			maxagec = atoi(optarg);
data/srg-1.3.6/src/filterSites.cc:57:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char hostname[1024] = {'\0'};
data/srg-1.3.6/src/filterSites.cc:58: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 network[1024] = {'\0'};
data/srg-1.3.6/src/filterSites.cc:59: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 netmask[1024] = {'\0'};
data/srg-1.3.6/src/ip2user.cc:56: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 netmask[1024];
data/srg-1.3.6/src/ip2user.cc:57: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 address[1024];
data/srg-1.3.6/src/ip2user.cc:58: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 username[1024];
data/srg-1.3.6/src/main.cc:38:1:  [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 *GROUPBY_NAMES[4] = {"Not Grouped", "User", "IP Address", "Subnet"};
data/srg-1.3.6/src/main.cc:39:1:  [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 *FILTERBY_NAMES[4] = {"Not Filtered", "User", "IP Address", "Subnet"};
data/srg-1.3.6/src/main.cc:374: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 * parts[10];
data/srg-1.3.6/src/main.cc:389: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).
			int timestamp = atoi(parts[pos]);
data/srg-1.3.6/src/main.cc:424:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	lineOut->timestamp = atoi(parts[0]);
data/srg-1.3.6/src/main.cc:425:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	lineOut->elapsedTime = atoi(parts[1]);
data/srg-1.3.6/src/main.cc:438:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	lineOut->size = atoi(parts[4]);
data/srg-1.3.6/src/main.cc:613:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	outfile = fopen(filename, "w");
data/srg-1.3.6/src/main.cc:936:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	outfile = fopen(filename, "w");
data/srg-1.3.6/src/main.cc:1113: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).
		folder.tm_mday = atoi(day);
data/srg-1.3.6/src/main.cc:1115: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).
		folder.tm_year = atoi(year)-1900;
data/srg-1.3.6/src/main.cc:1154: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 file_name[256];
data/srg-1.3.6/src/md5.c:169: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(xbuf, data, 64);
data/srg-1.3.6/src/md5.c:343: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(pms->buf + offset, p, copy);
data/srg-1.3.6/src/md5.c:357: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(pms->buf, p, left);
data/srg-1.3.6/src/output.cc:77: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 sfilename[1024] = {'\0'};
data/srg-1.3.6/src/output.cc:78: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 dfilename[1024] = {'\0'};
data/srg-1.3.6/src/output.cc:87: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).
	source = fopen(sfilename, "r");
data/srg-1.3.6/src/output.cc:92: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).
	dest = fopen(dfilename, "w");
data/srg-1.3.6/src/output.cc:101: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] = {'\0'};
data/srg-1.3.6/src/utils.cc:35: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 tmp1[10];
data/srg-1.3.6/src/utils.cc:36: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 tmp2[10];
data/srg-1.3.6/src/utils.cc:74: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 year1[5], year2[5];
data/srg-1.3.6/src/utils.cc:75: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 month1[4], month2[4];
data/srg-1.3.6/src/utils.cc:76: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 day1[3], day2[3];
data/srg-1.3.6/src/utils.cc:100:6:  [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 (atoi(year1) < atoi(year2))
data/srg-1.3.6/src/utils.cc:100: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).
	if (atoi(year1) < atoi(year2))
data/srg-1.3.6/src/utils.cc:102: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).
	else if (atoi(year1) > atoi(year2))
data/srg-1.3.6/src/utils.cc:102:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	else if (atoi(year1) > atoi(year2))
data/srg-1.3.6/src/utils.cc:114:6:  [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 (atoi(day1) < atoi(day2))
data/srg-1.3.6/src/utils.cc:114: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).
	if (atoi(day1) < atoi(day2))
data/srg-1.3.6/src/utils.cc:116: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).
	else if (atoi(day1) > atoi(day2))
data/srg-1.3.6/src/utils.cc:116:24:  [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).
	else if (atoi(day1) > atoi(day2))
data/srg-1.3.6/src/utils.cc:135:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char sday[3];
data/srg-1.3.6/src/utils.cc:136: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 eday[3];
data/srg-1.3.6/src/utils.cc:137: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(sday, "%02d", localtime(&start)->tm_mday);
data/srg-1.3.6/src/utils.cc:138: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(eday, "%02d", localtime(&end)->tm_mday);
data/srg-1.3.6/src/utils.cc:395: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[50];
data/srg-1.3.6/src/utils.cc:396: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, "%llu", num);
data/srg-1.3.6/src/utils.cc:434:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hex_output[64];
data/srg-1.3.6/src/utils.cc:443: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(hex_output + di*2, "%02x", digest[di]);
data/srg-1.3.6/src/utils.cc:490: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 tfilename[1024] = {'\0'};
data/srg-1.3.6/src/utils.cc:491:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char fileversion[100] = {'\0'};
data/srg-1.3.6/src/utils.cc:532: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 lbuf[1024] = {'\0'};
data/srg-1.3.6/src/utils.cc:537:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(filename, "r");
data/srg-1.3.6/libconfig/config.lexer.c:591:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
data/srg-1.3.6/libconfig/config.lexer.c:1584:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return yy_scan_bytes(yystr,strlen(yystr) );
data/srg-1.3.6/libconfig/config.parser.c:816: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/srg-1.3.6/src/LocationReport.cc:150: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).
		unsigned int tlen = strlen(t);
data/srg-1.3.6/src/LocationReport.cc:155:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(tmp, t, 30);
data/srg-1.3.6/src/SiteReport.cc:247: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(location)>40) ? "&#133;" : "");
data/srg-1.3.6/src/SiteReport.cc:255: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(location)>40) ? "&#133;" : "");
data/srg-1.3.6/src/configuration.cc:497: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(srg.accessLog)<=0) {
data/srg-1.3.6/src/filterSites.cc:60:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		if (sscanf(excludeLine, "host %1023s", hostname) != 1) {
data/srg-1.3.6/src/filterSites.cc:61:8:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
			if (sscanf(excludeLine, "subnet %1023s %1023s",
data/srg-1.3.6/src/ip2user.cc:59:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		if (sscanf(ipLine, "%1023s %1023s %1023s", address,
data/srg-1.3.6/src/main.cc:248: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).
	orig = (char *)malloc(strlen(srg.accessLog)+1);
data/srg-1.3.6/src/main.cc:970: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(direntp->d_name) != 19)
data/srg-1.3.6/src/main.cc:1072: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(direntp->d_name) != 19)
data/srg-1.3.6/src/main.cc:1174:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat (file_name,"/");
data/srg-1.3.6/src/output.cc:123: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(srg.outputURL)==0 && strlen(rootpath)>0) {
data/srg-1.3.6/src/output.cc:123:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(srg.outputURL)==0 && strlen(rootpath)>0) {
data/srg-1.3.6/src/output.cc:162: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(base)>0)
data/srg-1.3.6/src/output.cc:178: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(srg.outputURL)==0 && strlen(rootpath)>0)
data/srg-1.3.6/src/output.cc:178:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(srg.outputURL)==0 && strlen(rootpath)>0)
data/srg-1.3.6/src/output.cc:197: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(base)>0)
data/srg-1.3.6/src/utils.cc:41: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(date1) != 19 || strlen(date2) != 19)
data/srg-1.3.6/src/utils.cc:41:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(date1) != 19 || strlen(date2) != 19)
data/srg-1.3.6/src/utils.cc:45:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(tmp1, date1, 9);
data/srg-1.3.6/src/utils.cc:46:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(tmp2, date2, 9);
data/srg-1.3.6/src/utils.cc:53:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(tmp1, date1+10, 9);
data/srg-1.3.6/src/utils.cc:54:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(tmp2, date2+10, 9);
data/srg-1.3.6/src/utils.cc:82: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(date1) != 9 || strlen(date2) != 9)
data/srg-1.3.6/src/utils.cc:82:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(date1) != 9 || strlen(date2) != 9)
data/srg-1.3.6/src/utils.cc:86:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(year1, date1, 4);
data/srg-1.3.6/src/utils.cc:88:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(month1, date1+4, 3);
data/srg-1.3.6/src/utils.cc:90:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(day1, date1+7, 2);
data/srg-1.3.6/src/utils.cc:92:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(year2, date2, 4);
data/srg-1.3.6/src/utils.cc:94:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(month2, date2+4, 3);
data/srg-1.3.6/src/utils.cc:96:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(day2, date2+7, 2);
data/srg-1.3.6/src/utils.cc:171: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(tDate)!=10) {
data/srg-1.3.6/src/utils.cc:194: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(tTime)!=8) {
data/srg-1.3.6/src/utils.cc:356: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).
	for (unsigned int i = 0; i < strlen(dirty); i++) {
data/srg-1.3.6/src/utils.cc:398: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).
	SrcLen	= strlen(buf)-1;
data/srg-1.3.6/src/utils.cc:439:4:  [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(plaintextstr));
data/srg-1.3.6/src/utils.cc:507: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(fileversion)<=0) {
data/srg-1.3.6/src/utils.cc:554: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).
	vstart += strlen(versionkey);
data/srg-1.3.6/src/utils.cc:566:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(&fileversion[0], vstart, fvlen);

ANALYSIS SUMMARY:

Hits = 114
Lines analyzed = 9018 in approximately 0.30 seconds (30278 lines/second)
Physical Source Lines of Code (SLOC) = 6018
Hits@level = [0] 344 [1]  43 [2]  63 [3]   1 [4]   7 [5]   0
Hits@level+ = [0+] 458 [1+] 114 [2+]  71 [3+]   8 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 76.105 [1+] 18.9432 [2+] 11.7979 [3+] 1.32935 [4+] 1.16318 [5+]   0
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.