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/ziproxy-3.3.1/src/fstring.h
Examining data/ziproxy-3.3.1/src/urltables.c
Examining data/ziproxy-3.3.1/src/cttables.c
Examining data/ziproxy-3.3.1/src/globaldefs.h
Examining data/ziproxy-3.3.1/src/gzpipe.h
Examining data/ziproxy-3.3.1/src/gencvtables.c
Examining data/ziproxy-3.3.1/src/cdetect.h
Examining data/ziproxy-3.3.1/src/cfgfile.c
Examining data/ziproxy-3.3.1/src/htmlopt.h
Examining data/ziproxy-3.3.1/src/embbin.h
Examining data/ziproxy-3.3.1/src/strtables.c
Examining data/ziproxy-3.3.1/src/http.c
Examining data/ziproxy-3.3.1/src/genembbin.c
Examining data/ziproxy-3.3.1/src/simplelist.h
Examining data/ziproxy-3.3.1/src/auth.h
Examining data/ziproxy-3.3.1/src/log.c
Examining data/ziproxy-3.3.1/src/cttables.h
Examining data/ziproxy-3.3.1/src/jp2tools.h
Examining data/ziproxy-3.3.1/src/simplelist.c
Examining data/ziproxy-3.3.1/src/urltables.h
Examining data/ziproxy-3.3.1/src/qparser.h
Examining data/ziproxy-3.3.1/src/cdetect.c
Examining data/ziproxy-3.3.1/src/qparser.c
Examining data/ziproxy-3.3.1/src/htmlopt.c
Examining data/ziproxy-3.3.1/src/log.h
Examining data/ziproxy-3.3.1/src/txtfiletools.h
Examining data/ziproxy-3.3.1/src/ziproxy.h
Examining data/ziproxy-3.3.1/src/misc.h
Examining data/ziproxy-3.3.1/src/auth.c
Examining data/ziproxy-3.3.1/src/session.c
Examining data/ziproxy-3.3.1/src/preemptdns.c
Examining data/ziproxy-3.3.1/src/image.h
Examining data/ziproxy-3.3.1/src/text.c
Examining data/ziproxy-3.3.1/src/misc.c
Examining data/ziproxy-3.3.1/src/txtfiletools.c
Examining data/ziproxy-3.3.1/src/fstring.c
Examining data/ziproxy-3.3.1/src/http.h
Examining data/ziproxy-3.3.1/src/ziproxy.c
Examining data/ziproxy-3.3.1/src/tools/ziproxylogtool.c
Examining data/ziproxy-3.3.1/src/preemptdns.h
Examining data/ziproxy-3.3.1/src/cvtables.h
Examining data/ziproxy-3.3.1/src/gzpipe.c
Examining data/ziproxy-3.3.1/src/session.h
Examining data/ziproxy-3.3.1/src/cfgfile.h
Examining data/ziproxy-3.3.1/src/text.h
Examining data/ziproxy-3.3.1/src/tosmarking.h
Examining data/ziproxy-3.3.1/src/jp2tools.c
Examining data/ziproxy-3.3.1/src/strtables.h
Examining data/ziproxy-3.3.1/src/netd.c
Examining data/ziproxy-3.3.1/src/image.c
Examining data/ziproxy-3.3.1/src/tosmarking.c

FINAL RESULTS:

data/ziproxy-3.3.1/src/cfgfile.c:736:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf (full_content_type, "application/%s", Compressible [i]);
data/ziproxy-3.3.1/src/cttables.c:87:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	        sprintf (newstr, "%s/%s", in_cttype, in_ctsubtype);
data/ziproxy-3.3.1/src/cttables.c:89:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf (newstr, "%s", in_cttype);
data/ziproxy-3.3.1/src/cttables.c:130: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 (local_subtype, subtype_slash + 1);
data/ziproxy-3.3.1/src/cttables.c:166:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf (temp_str, "%s/*", local_cttype);
data/ziproxy-3.3.1/src/cttables.c:177:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf (local_subtype_x, "x-%s", local_subtype);
data/ziproxy-3.3.1/src/http.c:520: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 (line, sizeof(line), "Content-Length: %"ZP_DATASIZE_STR, outlen);
data/ziproxy-3.3.1/src/http.c:904:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		if ( sscanf( hdr->url, "http://%[^:/]:%hu%s", hdr->host, &hdr->port, hdr->path ) == 3 );			
data/ziproxy-3.3.1/src/http.c:905:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		else if ( sscanf( hdr->url, "http://%[^/]%s", hdr->host, hdr->path ) == 2 )
data/ziproxy-3.3.1/src/http.c:931:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		else if ( sscanf( hdr->url, "%s", hdr->host ) == 1 )//equivalent to strcpy until first whitespace?
data/ziproxy-3.3.1/src/http.c:974: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 (hdr->path, hdr->url);
data/ziproxy-3.3.1/src/http.c:1663:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (new_url, "http://%s%s", hdr->host, hdr->url);
data/ziproxy-3.3.1/src/log.c:160:6:  [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.
	i = vfprintf (debuglog_file, fmt, ap);
data/ziproxy-3.3.1/src/log.c:485:6:  [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.
	i = vfprintf (errorlog_file, fmt, ap);
data/ziproxy-3.3.1/src/strtables.c:147:2:  [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 (*exp_data + prev_exp_data_len, strexp);
data/ziproxy-3.3.1/src/strtables.c:230: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 (tmp, st_strtable->meta.exp_tab[pos]);
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:491: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 (stderr, message, ap);
data/ziproxy-3.3.1/src/txtfiletools.c:216:12:  [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.
	return (! access (given_filename, F_OK));
data/ziproxy-3.3.1/src/urltables.c:70:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (newstr, "%s/%s", host, path);
data/ziproxy-3.3.1/src/netd.c:615:19:  [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 ((option = getopt_long (argc, argv, "c:df:g:hikp:u:", long_options, &option_index)) != EOF){
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:531:19:  [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 ((option = getopt_long (argc, argv, "m:i:o:h1:2:3:4:5:6:7:8:", long_options, &option_index)) != EOF){
data/ziproxy-3.3.1/src/auth.c:57: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 in[4], out[3], v;
data/ziproxy-3.3.1/src/cfgfile.c:734:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				char full_content_type [strlen (Compressible [i]) + 12 + 1];
data/ziproxy-3.3.1/src/cvtables.h:37:16:  [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.
const unsigned char table_bitres_any2eight [9][256] = { \
data/ziproxy-3.3.1/src/embbin.h:37: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.
const char embbin_empty_image [49] = {
data/ziproxy-3.3.1/src/genembbin.c:42:17:  [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 ((my_file = fopen (given_filename, "rb")) != NULL) {
data/ziproxy-3.3.1/src/globaldefs.h:41:39:  [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).
#define ZP_CONVERT_STR_TO_DATASIZE(a) atoi(a)
data/ziproxy-3.3.1/src/globaldefs.h:47:39:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
#define ZP_CONVERT_STR_TO_DATASIZE(a) atol(a)
data/ziproxy-3.3.1/src/gzpipe.c:63: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 in [BUFSIZE];
data/ziproxy-3.3.1/src/gzpipe.c:64: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 out [BUFSIZE];
data/ziproxy-3.3.1/src/gzpipe.c:66: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 gzip_footer[8];
data/ziproxy-3.3.1/src/gzpipe.c:200: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 in [BUFSIZE];
data/ziproxy-3.3.1/src/gzpipe.c:201: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 out [BUFSIZE];
data/ziproxy-3.3.1/src/gzpipe.c:328: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 out [BUFSIZE];
data/ziproxy-3.3.1/src/gzpipe.c:330: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 gzip_footer[8];
data/ziproxy-3.3.1/src/http.c:84:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char line[MAX_LINELEN];
data/ziproxy-3.3.1/src/http.c:104: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 new_user_agent [HEADER_REPLACEMENT_ENTRY_LEN];
data/ziproxy-3.3.1/src/http.c:562: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 content_len_str [200];
data/ziproxy-3.3.1/src/http.c:565: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 (content_len_str, "Content-Length: %d", embbin_empty_image_size);
data/ziproxy-3.3.1/src/http.c:613: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 [10000];
data/ziproxy-3.3.1/src/http.c:680: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 local_hostname [LOCAL_HOSTNAME_LEN];
data/ziproxy-3.3.1/src/http.c:683: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 local_time_str [32];
data/ziproxy-3.3.1/src/http.c:716:19:  [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 ((txtfile = fopen (txtfilename, "r")) != NULL){
data/ziproxy-3.3.1/src/http.c:757: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 timebuf[100];
data/ziproxy-3.3.1/src/http.c:1181: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 stream [STRM_BUFSIZE];
data/ziproxy-3.3.1/src/http.c:1463: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).
			hdr->status = atoi(&line[8]);
data/ziproxy-3.3.1/src/http.h: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 * hdr[MAX_HEADERS];
data/ziproxy-3.3.1/src/image.c:505: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(data, desc->buf + desc->x.pos,length);
data/ziproxy-3.3.1/src/image.c:703: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(desc->buf + desc->x.pos, data ,length);
data/ziproxy-3.3.1/src/image.c:858: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(data,desc->buf + desc->x.pos,copied);
data/ziproxy-3.3.1/src/image.c:952: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(Raster, LastImg->RasterBits, bmp->width*bmp->height);
data/ziproxy-3.3.1/src/image.c:1700: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 mode[30], *cmode;
data/ziproxy-3.3.1/src/image.c:2173: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 new_palette [1024];
data/ziproxy-3.3.1/src/image.c:2213: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 (bmp->palette, new_palette, sizeof (unsigned char) * bmp->pal_bpp * used_colors);
data/ziproxy-3.3.1/src/image.c:2283: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 (bmp->palette, new_palette, sizeof (unsigned char) * bmp->pal_bpp * used_colors);
data/ziproxy-3.3.1/src/jp2tools.c:133: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 x_out_buff [width];
data/ziproxy-3.3.1/src/jp2tools.c:134: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 x_in_buff [width + (xstep - 1) * 2];
data/ziproxy-3.3.1/src/jp2tools.c:139: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 y_out_buff [height];
data/ziproxy-3.3.1/src/jp2tools.c:140: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 y_in_buff [height + (ystep - 1) * 2];
data/ziproxy-3.3.1/src/jp2tools.c:201: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 (x_in_buff + (xstep - 1), datastart, width);	// to resample buffer
data/ziproxy-3.3.1/src/jp2tools.c:203: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 (datastart, x_out_buff, *out_width);	// from resample buffer
data/ziproxy-3.3.1/src/jp2tools.c:270: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 x_out_buff [width + xpos + xstep];
data/ziproxy-3.3.1/src/jp2tools.c:271: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 x_in_buff [width + 1];	// worst case (xstep = 1)
data/ziproxy-3.3.1/src/jp2tools.c:273: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 y_out_buff [height + ypos + ystep];
data/ziproxy-3.3.1/src/jp2tools.c:274: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 y_in_buff [height + 1];	// worst case (ystep = 1)
data/ziproxy-3.3.1/src/jp2tools.c:309: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 (x_in_buff, datastart, compressed_width);
data/ziproxy-3.3.1/src/jp2tools.c:316: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 (datastart, x_out_buff, width);	// from resample buffer
data/ziproxy-3.3.1/src/log.c:128:24:  [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 ((debuglog_file = fopen (debuglog_filename, "a")) != NULL) {
data/ziproxy-3.3.1/src/log.c:207:25:  [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 ((accesslog_file = fopen (accesslog_filename, "a")) != NULL) {
data/ziproxy-3.3.1/src/log.c:301: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 flags_str [32];
data/ziproxy-3.3.1/src/log.c:308: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 client_source [256];	/* string composed of: [username@]<IP|"?"> */
data/ziproxy-3.3.1/src/log.c:382:24:  [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 ((errorlog_file = fopen (errfilename, "a")) != NULL) {
data/ziproxy-3.3.1/src/log.c:429: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 str_time[32];
data/ziproxy-3.3.1/src/log.c:439:4:  [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 (str_time, "UNABLE_TO_GET_TIME");
data/ziproxy-3.3.1/src/netd.c:119: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 outbuf [128];
data/ziproxy-3.3.1/src/preemptdns.c:193: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 (workbuf, inbuf, inlen);
data/ziproxy-3.3.1/src/strtables.c:219:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp [st_strtable->meta.largest_len + 3]; // max len + trailing '\0' + 2 stopping '\0'
data/ziproxy-3.3.1/src/text.c:191:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buff_unpack[GUNZIP_BUFF];
data/ziproxy-3.3.1/src/text.c:198:17:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
		if((filedes = mkstemp(filenam)) < 0) return 10;
data/ziproxy-3.3.1/src/text.c:200:24:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
		if((filedes_unpack = mkstemp(filenam_unpack)) < 0) return 10;
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:54: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    host_name [HOSTNAME_BUFFER];
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:64: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	host_name [HOSTNAME_BUFFER];
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:317: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 (out_buf, count, element_len * sizeof(char));
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:336: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	tmp_line [LINE_BUFFER];
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:409: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	log_line [LINE_BUFFER];
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:445: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	log_line [LINE_BUFFER];
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:471: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	log_line [LINE_BUFFER];
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:636:27:  [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 ((goptions.in_file = fopen (goptions.in_filename, "r")) == NULL)
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:643:28:  [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 ((goptions.out_file = fopen (goptions.out_filename, "w")) == NULL) {
data/ziproxy-3.3.1/src/txtfiletools.c:81:17:  [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 ((my_file = fopen (given_filename, "rb")) != NULL) {
data/ziproxy-3.3.1/src/txtfiletools.c:225: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).
	if (my_file = fopen (given_filename, "w")) {
data/ziproxy-3.3.1/src/ziproxy.c:232:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char Portstr[10];
data/ziproxy-3.3.1/src/auth.c:63: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).
    str_len = strlen(input);
data/ziproxy-3.3.1/src/auth.c:115: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).
	fix_linebreaks_qp (userpasstxt, strlen (userpasstxt), userpasstxt);
data/ziproxy-3.3.1/src/auth.c:127:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (lone_userpass, userpass_pos, useful_linelen);
data/ziproxy-3.3.1/src/auth.c:193:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	cp_result = sasl_checkpass (conn, user, strlen (user), pass, strlen (pass));
data/ziproxy-3.3.1/src/auth.c:193:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	cp_result = sasl_checkpass (conn, user, strlen (user), pass, strlen (pass));
data/ziproxy-3.3.1/src/cfgfile.c:734: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).
				char full_content_type [strlen (Compressible [i]) + 12 + 1];
data/ziproxy-3.3.1/src/cttables.c:80: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).
	in_ctsubtype_len = strlen (in_ctsubtype);
data/ziproxy-3.3.1/src/cttables.c:82: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).
	buflen = strlen (in_cttype) + in_ctsubtype_len + 2; /* "/\0" */
data/ziproxy-3.3.1/src/cttables.c:128:42:  [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 ((local_subtype = (char *) calloc ((strlen (subtype_slash + 1) + 1), sizeof (char))) == NULL)
data/ziproxy-3.3.1/src/cttables.c:165:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ((temp_str = calloc (strlen (local_contenttype) + 3, sizeof (char))) != NULL) {
data/ziproxy-3.3.1/src/cttables.c:175:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strncmp ("x-", local_subtype, 2) && (strlen (local_subtype) > 0)) {
data/ziproxy-3.3.1/src/cttables.c:176:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if ((local_subtype_x = calloc (strlen (local_subtype) + 3, sizeof (char))) != NULL) {
data/ziproxy-3.3.1/src/fstring.h:58:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define WHICH_STRLEN strlen
data/ziproxy-3.3.1/src/gzpipe.c:95:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					fgetc (source);
data/ziproxy-3.3.1/src/gzpipe.c:96:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					fgetc (source);
data/ziproxy-3.3.1/src/gzpipe.c:109:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						curchar = fgetc (source);
data/ziproxy-3.3.1/src/gzpipe.c:227:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					fgetc (source);
data/ziproxy-3.3.1/src/gzpipe.c:228:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					fgetc (source);
data/ziproxy-3.3.1/src/gzpipe.c:241:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						curchar = fgetc (source);
data/ziproxy-3.3.1/src/gzpipe.h:35:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define fastgetc(x) getc(x)
data/ziproxy-3.3.1/src/http.c:645:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			r = read (client_read_fd, buf, sizeof (buf));
data/ziproxy-3.3.1/src/http.c:653:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			r = read (server_read_fd, buf, sizeof (buf));
data/ziproxy-3.3.1/src/http.c:804:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if(!strncasecmp(hdr->hdr[i], key, strlen(key)))
data/ziproxy-3.3.1/src/http.c:805: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).
			return hdr->hdr[i] + strlen(key);
data/ziproxy-3.3.1/src/http.c:812:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if(!strncasecmp(hdr->hdr[i], key, strlen(key)))
data/ziproxy-3.3.1/src/http.c:903:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy( hdr->url, "http", 4 );	/* make sure it's lower case */
data/ziproxy-3.3.1/src/http.c:943:74:  [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 ((strncasecmp (line, "Proxy-Authorization: Basic ", 27) == 0) && (strlen (line) > 30)) {
data/ziproxy-3.3.1/src/http.c:996: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).
    k = l = strlen( line );
data/ziproxy-3.3.1/src/http.c:1032:60:  [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 (strncasecmp(line,"Proxy-Authorization:",20) == 0 && strlen(line) > 30) {
data/ziproxy-3.3.1/src/http.c:1033:74:  [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 ((strncasecmp (line, "Proxy-Authorization: Basic ", 27) == 0) && (strlen (line) > 30)) {
data/ziproxy-3.3.1/src/http.c:1123: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).
				if(linelen + strlen(ServHost) + 
data/ziproxy-3.3.1/src/http.c:1267:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					fgetc (from);
data/ziproxy-3.3.1/src/http.c:1268:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					fgetc (from);
data/ziproxy-3.3.1/src/http.c:1281:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						curchar = fgetc (from);
data/ziproxy-3.3.1/src/http.c:1393: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).
	n = strlen(line);
data/ziproxy-3.3.1/src/http.c:1648: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).
	if (spaces > 1) memmove(colon+2,i,strlen(ln)-(colon-ln) - 2);
data/ziproxy-3.3.1/src/http.c:1662: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).
	new_url = malloc (strlen (hdr->url) + strlen (hdr->host) + 7 + 1);
data/ziproxy-3.3.1/src/http.c:1662:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	new_url = malloc (strlen (hdr->url) + strlen (hdr->host) + 7 + 1);
data/ziproxy-3.3.1/src/log.c:330:50:  [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.
	if (accesslog_flags & LOG_AC_FLAG_TRANSP_PROXY) strcat (flags_str, "T");
data/ziproxy-3.3.1/src/log.c:331:48:  [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.
	if (accesslog_flags & LOG_AC_FLAG_CONV_PROXY) strcat (flags_str, "P");
data/ziproxy-3.3.1/src/log.c:332:49:  [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.
	if (accesslog_flags & LOG_AC_FLAG_TOS_CHANGED) strcat (flags_str, "Q");
data/ziproxy-3.3.1/src/log.c:333:49:  [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.
	if (accesslog_flags & LOG_AC_FLAG_CONN_METHOD) strcat (flags_str, "S");
data/ziproxy-3.3.1/src/log.c:334:49:  [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.
	if (accesslog_flags & LOG_AC_FLAG_BROKEN_PIPE) strcat (flags_str, "B");
data/ziproxy-3.3.1/src/log.c:335:55:  [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.
	if (accesslog_flags & LOG_AC_FLAG_IMG_TOO_EXPANSIVE) strcat (flags_str, "K");
data/ziproxy-3.3.1/src/log.c:336:58:  [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.
	if (accesslog_flags & LOG_AC_FLAG_LLCOMP_TOO_EXPANSIVE) strcat (flags_str, "G");
data/ziproxy-3.3.1/src/log.c:337:50:  [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.
	if (accesslog_flags & LOG_AC_FLAG_XFER_TIMEOUT) strcat (flags_str, "Z");
data/ziproxy-3.3.1/src/log.c:338:49:  [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.
	if (accesslog_flags & LOG_AC_FLAG_URL_NOTPROC) strcat (flags_str, "N");
data/ziproxy-3.3.1/src/log.c:339:50:  [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.
	if (accesslog_flags & LOG_AC_FLAG_TOOBIG_NOMEM) strcat (flags_str, "W");
data/ziproxy-3.3.1/src/log.c:340:51:  [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.
	if (accesslog_flags & LOG_AC_FLAG_REPLACED_DATA) strcat (flags_str, "R");
data/ziproxy-3.3.1/src/log.c:341:45:  [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.
	if (accesslog_flags & LOG_AC_FLAG_SIGSEGV) strcat (flags_str, "1");
data/ziproxy-3.3.1/src/log.c:342:44:  [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.
	if (accesslog_flags & LOG_AC_FLAG_SIGFPE) strcat (flags_str, "2");
data/ziproxy-3.3.1/src/log.c:343:44:  [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.
	if (accesslog_flags & LOG_AC_FLAG_SIGILL) strcat (flags_str, "3");
data/ziproxy-3.3.1/src/log.c:344:44:  [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.
	if (accesslog_flags & LOG_AC_FLAG_SIGBUS) strcat (flags_str, "4");
data/ziproxy-3.3.1/src/log.c:345:44:  [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.
	if (accesslog_flags & LOG_AC_FLAG_SIGSYS) strcat (flags_str, "5");
data/ziproxy-3.3.1/src/log.c:346:45:  [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.
	if (accesslog_flags & LOG_AC_FLAG_SIGTERM) strcat (flags_str, "X");
data/ziproxy-3.3.1/src/log.c:347:45:  [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.
	if (accesslog_flags & LOG_AC_SOFTWARE_BUG) strcat (flags_str, "*");
data/ziproxy-3.3.1/src/misc.c:52: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).
	out_len = strlen (out_str);
data/ziproxy-3.3.1/src/netd.c:744:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask (0);
data/ziproxy-3.3.1/src/preemptdns.c:67:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		start_pos = start_pos + strlen(srch_patt);
data/ziproxy-3.3.1/src/preemptdns.c:116: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).
	hostname_len = strlen (hostname);
data/ziproxy-3.3.1/src/preemptdns.c:218: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).
					search_from = hostname + strlen (hostname) + 1;
data/ziproxy-3.3.1/src/qparser.c:56:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (newstr, s, n);
data/ziproxy-3.3.1/src/qparser.c:194: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).
	counter = strlen (readpos);
data/ziproxy-3.3.1/src/qparser.c:272: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 (conf_key) == equal_pos) {
data/ziproxy-3.3.1/src/qparser.c:296: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).
	conf_key_len = strlen (conf_key);
data/ziproxy-3.3.1/src/qparser.c:491: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 (src);
data/ziproxy-3.3.1/src/qparser.c:641: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).
	conf_len = strlen (conf_handler->filedata);
data/ziproxy-3.3.1/src/simplelist.c:44: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).
		filedata_len = strlen (filedata);
data/ziproxy-3.3.1/src/strtables.c:111: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).
	strexp_len = strlen (strexp);
data/ziproxy-3.3.1/src/strtables.c:153: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).
		pos += strlen (*exp_data + pos) + 1;
data/ziproxy-3.3.1/src/strtables.c:231: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).
		meta_str_len = strlen (tmp);
data/ziproxy-3.3.1/src/strtables.c:293: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).
			if (strncmp (meta_str, strdata, strlen (meta_str) != 0)) {
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:221:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (stats_matrix->table[pos_in_matrix].host_name, host_name, HOSTNAME_BUFFER - 1);
data/ziproxy-3.3.1/src/tools/ziproxylogtool.c:222: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).
		stats_matrix->table[pos_in_matrix].host_name[strlen (host_name)] = '\0';
data/ziproxy-3.3.1/src/urltables.c:66: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).
	buflen = strlen (host) + strlen (path) + 2; /* "/\0" */
data/ziproxy-3.3.1/src/urltables.c:66:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	buflen = strlen (host) + strlen (path) + 2; /* "/\0" */
data/ziproxy-3.3.1/src/urltables.c:122: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).
	fix_linebreaks_qp (urltxt, strlen (urltxt), urltxt);
data/ziproxy-3.3.1/src/urltables.c:134:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (lone_url, url_pos, useful_linelen);
data/ziproxy-3.3.1/src/urltables.c:144:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy (lone_url, host, hostlen);

ANALYSIS SUMMARY:

Hits = 171
Lines analyzed = 15500 in approximately 0.46 seconds (33661 lines/second)
Physical Source Lines of Code (SLOC) = 10160
Hits@level = [0]  90 [1]  79 [2]  71 [3]   2 [4]  19 [5]   0
Hits@level+ = [0+] 261 [1+] 171 [2+]  92 [3+]  21 [4+]  19 [5+]   0
Hits/KSLOC@level+ = [0+] 25.689 [1+] 16.8307 [2+] 9.05512 [3+] 2.06693 [4+] 1.87008 [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.