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/ffproxy-1.6/db.h
Examining data/ffproxy-1.6/regex.c
Examining data/ffproxy-1.6/regex.h
Examining data/ffproxy-1.6/dns.c
Examining data/ffproxy-1.6/dns.h
Examining data/ffproxy-1.6/msg.c
Examining data/ffproxy-1.6/msg.h
Examining data/ffproxy-1.6/filter.h
Examining data/ffproxy-1.6/access.c
Examining data/ffproxy-1.6/access.h
Examining data/ffproxy-1.6/file.c
Examining data/ffproxy-1.6/file.h
Examining data/ffproxy-1.6/request.h
Examining data/ffproxy-1.6/http.c
Examining data/ffproxy-1.6/http.h
Examining data/ffproxy-1.6/poll.c
Examining data/ffproxy-1.6/poll.h
Examining data/ffproxy-1.6/alloc.c
Examining data/ffproxy-1.6/alloc.h
Examining data/ffproxy-1.6/number.c
Examining data/ffproxy-1.6/number.h
Examining data/ffproxy-1.6/signals.c
Examining data/ffproxy-1.6/signals.h
Examining data/ffproxy-1.6/print.c
Examining data/ffproxy-1.6/print.h
Examining data/ffproxy-1.6/socket.h
Examining data/ffproxy-1.6/req.h
Examining data/ffproxy-1.6/filter.c
Examining data/ffproxy-1.6/cfg.h
Examining data/ffproxy-1.6/db.c
Examining data/ffproxy-1.6/main.c
Examining data/ffproxy-1.6/socket.c
Examining data/ffproxy-1.6/request.c
Examining data/ffproxy-1.6/dbs.h

FINAL RESULTS:

data/ffproxy-1.6/cfg.h:21:18:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	int             syslog;
data/ffproxy-1.6/db.c:179: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(p, buf);
data/ffproxy-1.6/filter.c:101:9:  [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).
	(void) strcpy(r->header[i], loop_header);
data/ffproxy-1.6/filter.c:109:10:  [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).
		(void) strcpy(r->header[i], f_hdr_add[j]);
data/ffproxy-1.6/filter.c:171:10:  [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).
		(void) strcpy(r->header[i], http_pkalive);
data/ffproxy-1.6/filter.c:173:10:  [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).
		(void) strcpy(r->header[i], http_kalive);
data/ffproxy-1.6/print.c:41:13:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	if (config.syslog)
data/ffproxy-1.6/print.c:48:13:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	if (config.syslog)
data/ffproxy-1.6/print.c:59:9:  [4] (format) vsnprintf:
  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.
	(void) vsnprintf(buf, sizeof(buf), fmt, ap);
data/ffproxy-1.6/print.c:62:13:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	if (config.syslog)
data/ffproxy-1.6/print.c:76:9:  [4] (format) vsnprintf:
  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.
	(void) vsnprintf(buf, sizeof(buf), fmt, ap);
data/ffproxy-1.6/print.c:79:13:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	if (config.syslog)
data/ffproxy-1.6/print.c:93:9:  [4] (format) vsnprintf:
  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.
	(void) vsnprintf(buf, sizeof(buf), fmt, ap);
data/ffproxy-1.6/print.c:96:13:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	if (config.syslog)
data/ffproxy-1.6/print.c:109:9:  [4] (format) vsnprintf:
  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.
	(void) vsnprintf(buf, sizeof(buf), fmt, ap);
data/ffproxy-1.6/print.c:112:13:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	if (config.syslog)
data/ffproxy-1.6/print.h:2:28:  [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.
#define DEBUG(args)	(void) printf args , (void) printf("\n");;
data/ffproxy-1.6/request.c:199:10:  [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).
		(void) strcpy(p, b);
data/ffproxy-1.6/request.c:499:11:  [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).
			(void) strcpy(r->header[i++], buf);
data/ffproxy-1.6/request.c:527:12:  [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).
				(void) strcat(buf, r->header[i++]);
data/ffproxy-1.6/cfg.h:14:18:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
	char            chroot[256];
data/ffproxy-1.6/db.c:313:27:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
				(void) strncpy(config.chroot, abuf, sizeof(config.chroot) - 1);
data/ffproxy-1.6/db.c:313:55:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
				(void) strncpy(config.chroot, abuf, sizeof(config.chroot) - 1);
data/ffproxy-1.6/db.c:314:12:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
				config.chroot[sizeof(config.chroot) - 1] = 0;
data/ffproxy-1.6/db.c:314:33:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
				config.chroot[sizeof(config.chroot) - 1] = 0;
data/ffproxy-1.6/main.c:93:14:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt(argc, argv, "vdbBc:C:p:x:X:l:u:g:r:D:F:f:s4a:A:n:h")) != -1) {
data/ffproxy-1.6/main.c:169:39:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
			if (strlen(optarg) > sizeof(config.chroot) - 1 ) {
data/ffproxy-1.6/main.c:173:26:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
			(void) strncpy(config.chroot, optarg, sizeof(config.chroot) - 1);
data/ffproxy-1.6/main.c:173:56:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
			(void) strncpy(config.chroot, optarg, sizeof(config.chroot) - 1);
data/ffproxy-1.6/main.c:174:11:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
			config.chroot[sizeof(config.chroot) - 1] = '\0';
data/ffproxy-1.6/main.c:174:32:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
			config.chroot[sizeof(config.chroot) - 1] = '\0';
data/ffproxy-1.6/main.c:315:15:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if (*config.chroot != '\0') {
data/ffproxy-1.6/main.c:316:21:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
			if (chdir(config.chroot) != 0)
data/ffproxy-1.6/main.c:318:8:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
			if (chroot(config.chroot) != 0)
data/ffproxy-1.6/main.c:318:22:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
			if (chroot(config.chroot) != 0)
data/ffproxy-1.6/main.c:320:38:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
			info("chroot()ed to %s\n", config.chroot);
data/ffproxy-1.6/cfg.h:4: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		ipv4[256];
data/ffproxy-1.6/cfg.h:5: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		ipv6[256];
data/ffproxy-1.6/cfg.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            chroot[256];
data/ffproxy-1.6/cfg.h:15: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            dbdir[256];
data/ffproxy-1.6/cfg.h:16: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[256];
data/ffproxy-1.6/cfg.h:18: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		proxyhost[256];
data/ffproxy-1.6/cfg.h:32: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		accelhost[256];
data/ffproxy-1.6/cfg.h:43: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.
        char            piddir[256];
data/ffproxy-1.6/db.c:58: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           *a_dyndns[MAX_E];
data/ffproxy-1.6/db.c:63: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           *f_hdr_entry[MAX_E];
data/ffproxy-1.6/db.c:64: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           *f_hdr_add[MAX_E];
data/ffproxy-1.6/db.c:67: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           *f_rhdr_entry[MAX_E];
data/ffproxy-1.6/db.c:164: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[512], *p;
data/ffproxy-1.6/db.c:192: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[512], *p;
data/ffproxy-1.6/db.c:193:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char            errbuf[512];
data/ffproxy-1.6/db.c:226:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char            buf[8192];
data/ffproxy-1.6/db.c:233: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.
	(void) memcpy(m->c, buf, len);
data/ffproxy-1.6/db.c:247: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            obuf[100];
data/ffproxy-1.6/db.c:248: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            abuf[100];
data/ffproxy-1.6/db.c:249: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            b[300];
data/ffproxy-1.6/db.c:253: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).
	} else if ((fp = fopen(config.file, "r")) != NULL) {
data/ffproxy-1.6/db.c:263: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.childs = atoi(abuf);
data/ffproxy-1.6/db.c:286: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).
				config.port = atoi(abuf);
data/ffproxy-1.6/db.c:295: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).
				if (!(config.uid = atoi(abuf))) {
data/ffproxy-1.6/db.c:304: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).
				if (!(config.gid = atoi(abuf))) {
data/ffproxy-1.6/db.c:321: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).
				config.proxyport = atoi(abuf);
data/ffproxy-1.6/db.c:334: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).
				config.backlog = atoi(abuf);
data/ffproxy-1.6/db.c:353: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).
				config.accelport = atoi(abuf);
data/ffproxy-1.6/db.c:374: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.to_con = atoi(abuf);
data/ffproxy-1.6/dns.c:61:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) memcpy(&ip, hp->h_addr, hp->h_length);
data/ffproxy-1.6/file.c:37:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = open(path, O_RDONLY, 0)) < 0)
data/ffproxy-1.6/file.c:48: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).
	if ((fp = fopen(path, "r")) == NULL)
data/ffproxy-1.6/filter.c:108:19:  [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.
		r->header[i] = (char *) my_alloc(strlen(f_hdr_add[j]) + 1);
data/ffproxy-1.6/http.c:237: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 o_url[sizeof(r->url)];
data/ffproxy-1.6/main.c:46: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            loop_header[100];
data/ffproxy-1.6/main.c:118: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).
			config.port = atoi(optarg);
data/ffproxy-1.6/main.c:133: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).
			config.proxyport = atoi(optarg);
data/ffproxy-1.6/main.c:140: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.childs = atoi(optarg);
data/ffproxy-1.6/main.c:147: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).
			if (!(config.uid = atoi(optarg))) {
data/ffproxy-1.6/main.c:158: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).
			if (!(config.gid = atoi(optarg))) {
data/ffproxy-1.6/main.c:207: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).
			config.accelport = atoi(optarg);
data/ffproxy-1.6/main.c:342: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 ((fp = fopen("ffproxy.pid", "w")) == NULL)
data/ffproxy-1.6/msg.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            msg[8192];
data/ffproxy-1.6/print.c:56: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[2048];
data/ffproxy-1.6/print.c:73: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[2048];
data/ffproxy-1.6/print.c:90: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[2048];
data/ffproxy-1.6/print.c:106: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[2048];
data/ffproxy-1.6/req.h:6: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            name[128];
data/ffproxy-1.6/req.h:7: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            ip[128];
data/ffproxy-1.6/req.h:11: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            url[2048];
data/ffproxy-1.6/req.h:12: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		urlpath[2048];
data/ffproxy-1.6/req.h:13: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[128];
data/ffproxy-1.6/req.h:23: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            tstamp[32];
data/ffproxy-1.6/req.h:24: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            ctype[32];
data/ffproxy-1.6/req.h:26: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           *header[MAX_HEADERS];
data/ffproxy-1.6/req.h:28: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            fname[256];
data/ffproxy-1.6/req.h:29: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            lname[257];
data/ffproxy-1.6/request.c:60: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[2048];
data/ffproxy-1.6/request.c:188: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[2048];
data/ffproxy-1.6/request.c:293: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[4096];
data/ffproxy-1.6/request.c:301: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 port[6];
data/ffproxy-1.6/request.c:528:12:  [2] (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 string.
				(void) strcat(buf, "\r\n");
data/ffproxy-1.6/request.c:550:10:  [2] (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 string.
		(void) strcat(buf, "\r\n");
data/ffproxy-1.6/socket.c:68:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		strport[6];
data/ffproxy-1.6/db.c:178: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).
		p = (char *) my_alloc(strlen(buf) + 1);
data/ffproxy-1.6/db.c:230:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(f, &buf, sizeof(buf));
data/ffproxy-1.6/db.c:255:11:  [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.
			(void) sscanf(b, "%99s %99s", obuf, abuf);
data/ffproxy-1.6/db.c:278:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				(void) strncpy(config.ipv4, abuf, sizeof(config.ipv4) - 1);
data/ffproxy-1.6/db.c:282:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				(void) strncpy(config.ipv6, abuf, sizeof(config.ipv6) - 1);
data/ffproxy-1.6/db.c:313:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				(void) strncpy(config.chroot, abuf, sizeof(config.chroot) - 1);
data/ffproxy-1.6/db.c:317:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				(void) strncpy(config.proxyhost, abuf, sizeof(config.proxyhost) - 1);
data/ffproxy-1.6/db.c:330:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				(void) strncpy(config.dbdir, abuf, sizeof(config.dbdir) - 1);
data/ffproxy-1.6/db.c:349:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				(void) strncpy(config.accelhost, abuf, sizeof(config.accelhost) - 1);
data/ffproxy-1.6/db.c:378:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				(void) strncpy(config.piddir, abuf, sizeof(config.piddir) - 1);
data/ffproxy-1.6/filter.c:62: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).
		if (strncasecmp(r->header[i], loop_header, strlen(loop_header)) == 0) {
data/ffproxy-1.6/filter.c:77:50:  [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(r->header[i], f_hdr_entry[j], strlen(f_hdr_entry[j])) == 0) {
data/ffproxy-1.6/filter.c:100: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).
	r->header[i] = (char *) my_alloc(strlen(loop_header) + 1);
data/ffproxy-1.6/filter.c:108: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).
		r->header[i] = (char *) my_alloc(strlen(f_hdr_add[j]) + 1);
data/ffproxy-1.6/filter.c:135: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).
		if (strncasecmp(r->header[i], loop_header, strlen(loop_header)) == 0) {
data/ffproxy-1.6/filter.c:150:51:  [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(r->header[i], f_rhdr_entry[j], strlen(f_rhdr_entry[j])) == 0) {
data/ffproxy-1.6/filter.c:170: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).
		r->header[i] = (char *) my_alloc(strlen(http_pkalive) + 1);
data/ffproxy-1.6/filter.c:172:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		r->header[++i] = (char *) my_alloc(strlen(http_kalive) + 1);
data/ffproxy-1.6/http.c:48: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 (strncmp(http_get, s, strlen(http_get)) == 0) {
data/ffproxy-1.6/http.c:50:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		s += strlen(http_get);
data/ffproxy-1.6/http.c:51: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).
	} else if (strncmp(http_post, s, strlen(http_post)) == 0) {
data/ffproxy-1.6/http.c:53:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		s += strlen(http_post);
data/ffproxy-1.6/http.c:54: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).
	} else if (strncmp(http_head, s, strlen(http_head)) == 0) {
data/ffproxy-1.6/http.c:56:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		s += strlen(http_head);
data/ffproxy-1.6/http.c:57:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	} else if (strncmp(http_connect, s, strlen(http_connect)) == 0) {
data/ffproxy-1.6/http.c:59:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		s += strlen(http_connect);
data/ffproxy-1.6/http.c:79: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).
	} else if (strncmp(s, http, strlen(http)) != 0) {
data/ffproxy-1.6/http.c:84: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).
		while (i < strlen(http)) {
data/ffproxy-1.6/http.c:99:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (config.accel && strncmp(s, http, strlen(http)) == 0) {
data/ffproxy-1.6/http.c:101:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		s += strlen(http);
data/ffproxy-1.6/http.c:130: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 (strncasecmp(s, httpv, strlen(httpv)) != 0)
data/ffproxy-1.6/http.c:132:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	s += strlen(httpv);
data/ffproxy-1.6/http.c:151: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).
	p += strlen(http);
data/ffproxy-1.6/http.c:200: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).
	if (r->relative && strncmp(s, h_host, strlen(h_host)) == 0) {
data/ffproxy-1.6/http.c:203:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		s += strlen(h_host);
data/ffproxy-1.6/http.c:233: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(r->url) + strlen(http) + strlen(r->host) + 7 >= sizeof(r->url)) {
data/ffproxy-1.6/http.c:233: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).
		if (strlen(r->url) + strlen(http) + strlen(r->host) + 7 >= sizeof(r->url)) {
data/ffproxy-1.6/http.c:233:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(r->url) + strlen(http) + strlen(r->host) + 7 >= sizeof(r->url)) {
data/ffproxy-1.6/http.c:238:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void) strncpy(o_url, r->url, sizeof(o_url) - 1);
data/ffproxy-1.6/http.c:263: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).
	if (strncasecmp(http_clen, s, strlen(http_clen)) == 0) {
data/ffproxy-1.6/http.c:266:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		s += strlen(http_clen);
data/ffproxy-1.6/http.c:288:41:  [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 (strncasecmp(http_tstamp, s, strlen(http_tstamp)) == 0) {
data/ffproxy-1.6/http.c:291:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		s += strlen(http_tstamp);
data/ffproxy-1.6/http.c:309: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).
	} else if (strncasecmp(http_pkalive, s, strlen(http_pkalive)) == 0
data/ffproxy-1.6/http.c:310: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).
		|| strncasecmp(http_kalive, s, strlen(http_kalive)) == 0) {
data/ffproxy-1.6/main.c:71:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(config.dbdir, DATADIR, sizeof(config.dbdir) - 1);
data/ffproxy-1.6/main.c:73:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(config.file, CFGFILE, sizeof(config.file) - 1);
data/ffproxy-1.6/main.c:91:9:  [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.
	(void) strncpy(config.piddir, "/var/run", sizeof(config.piddir) - 1);
data/ffproxy-1.6/main.c:110:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void) strncpy(config.ipv4, optarg, sizeof(config.ipv4) - 1);
data/ffproxy-1.6/main.c:114:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void) strncpy(config.ipv6, optarg, sizeof(config.ipv6) - 1);
data/ffproxy-1.6/main.c:125: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).
			if (strlen(optarg) > sizeof(config.proxyhost) - 1 ) {
data/ffproxy-1.6/main.c:129:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void) strncpy(config.proxyhost, optarg, sizeof(config.proxyhost) - 1);
data/ffproxy-1.6/main.c:169: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).
			if (strlen(optarg) > sizeof(config.chroot) - 1 ) {
data/ffproxy-1.6/main.c:173:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void) strncpy(config.chroot, optarg, sizeof(config.chroot) - 1);
data/ffproxy-1.6/main.c:177: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).
			if (strlen(optarg) > sizeof(config.dbdir) - 1 ) {
data/ffproxy-1.6/main.c:181:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void) strncpy(config.dbdir, optarg, sizeof(config.dbdir) - 1);
data/ffproxy-1.6/main.c:187: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).
			if (strlen(optarg) > sizeof(config.file) - 1 ) {
data/ffproxy-1.6/main.c:191:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void) strncpy(config.file, optarg, sizeof(config.file) - 1);
data/ffproxy-1.6/main.c:203:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void) strncpy(config.accelhost, optarg, sizeof(config.accelhost) - 1);
data/ffproxy-1.6/main.c:214: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).
		    if (strlen(optarg) > sizeof(config.piddir) - 1 ) {
data/ffproxy-1.6/main.c:218:14:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		    (void) strncpy(config.piddir, optarg, sizeof(config.piddir) - 1);
data/ffproxy-1.6/request.c:224:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(s, &c, 1) != 1 || c == 0)
data/ffproxy-1.6/request.c:425: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).
			len += strlen(r->header[i]) + strlen("\r\n");
data/ffproxy-1.6/request.c:425: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).
			len += strlen(r->header[i]) + strlen("\r\n");
data/ffproxy-1.6/request.c:427:12:  [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.
				(void) strncat(buf, r->header[i++], len);
data/ffproxy-1.6/request.c:428:12:  [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.
				(void) strncat(buf, "\r\n", strlen("\r\n"));
data/ffproxy-1.6/request.c:428: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).
				(void) strncat(buf, "\r\n", strlen("\r\n"));
data/ffproxy-1.6/request.c:446: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("\r\n");
data/ffproxy-1.6/request.c:452:10:  [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.
		(void) strncat(buf, "\r\n", strlen("\r\n"));
data/ffproxy-1.6/request.c:452: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).
		(void) strncat(buf, "\r\n", strlen("\r\n"));
data/ffproxy-1.6/request.c:480:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			len = read(cl, buf, sizeof(buf));
data/ffproxy-1.6/request.c:525: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).
			len += strlen(r->header[i]) + strlen("\r\n");
data/ffproxy-1.6/request.c:525: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).
			len += strlen(r->header[i]) + strlen("\r\n");
data/ffproxy-1.6/request.c:544: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("\r\n");
data/ffproxy-1.6/request.c:568: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 (write(cl, con_est, strlen(con_est)) < 1)
data/ffproxy-1.6/request.c:585:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				len = read(cl, buf, sizeof(buf));
data/ffproxy-1.6/request.c:589:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				len = read(s, buf, sizeof(buf));
data/ffproxy-1.6/request.c:597:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (my_poll(s, IN) > 0 && (len = read(s, buf, sizeof(buf))) > 0) {
data/ffproxy-1.6/socket.c:160:11:  [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.
			(void) usleep(50000);

ANALYSIS SUMMARY:

Hits = 179
Lines analyzed = 2979 in approximately 0.13 seconds (22853 lines/second)
Physical Source Lines of Code (SLOC) = 2310
Hits@level = [0]  37 [1]  79 [2]  64 [3]  16 [4]  20 [5]   0
Hits@level+ = [0+] 216 [1+] 179 [2+] 100 [3+]  36 [4+]  20 [5+]   0
Hits/KSLOC@level+ = [0+] 93.5065 [1+] 77.4892 [2+] 43.29 [3+] 15.5844 [4+] 8.65801 [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.