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/flent-1.3.2/misc/file_iterate.c
Examining data/flent-1.3.2/misc/tc_iterate.c
Examining data/flent-1.3.2/misc/wifistats_iterate.c

FINAL RESULTS:

data/flent-1.3.2/misc/tc_iterate.c:170:6:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		if(execlp("tc", "tc", "-s", "-b", "-",NULL)==-1) {
data/flent-1.3.2/misc/tc_iterate.c:193:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cmd,"%s show dev %s\n",a->command,a->interface);
data/flent-1.3.2/misc/wifistats_iterate.c:152:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf,"/sys/kernel/debug/ieee80211/phy%i/netdev:%s/stations",i,dev);
data/flent-1.3.2/misc/wifistats_iterate.c:166:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(dir,"/sys/kernel/debug/ieee80211/phy%i/netdev:%s/stations",
data/flent-1.3.2/misc/wifistats_iterate.c:194:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(dir,"/sys/kernel/debug/ieee80211/phy%i/netdev:%s/stations",
data/flent-1.3.2/misc/wifistats_iterate.c:206:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(stations[cnt].macaddr,"%s",in->d_name);
data/flent-1.3.2/misc/wifistats_iterate.c:207:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(stations[cnt].rc_stats_file,"%s/%s/%s",dir,in->d_name,"rc_stats_csv");
data/flent-1.3.2/misc/wifistats_iterate.c:208:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(stations[cnt].airtime_file,"%s/%s/%s",dir,in->d_name,"airtime");
data/flent-1.3.2/misc/wifistats_iterate.c:234:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		size += sprintf(&buf[size],"Station: %s\n",s[i].macaddr);
data/flent-1.3.2/misc/file_iterate.c:105:9:  [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.
		opt = getopt_long(argc, argv,
data/flent-1.3.2/misc/tc_iterate.c:109:9:  [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.
		opt = getopt_long(argc, argv,
data/flent-1.3.2/misc/wifistats_iterate.c:270:9:  [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.
		opt = getopt_long(argc, argv,
data/flent-1.3.2/misc/file_iterate.c:127:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fp = open(filename, O_RDONLY);
data/flent-1.3.2/misc/file_iterate.c:145:15:  [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.
		int added = sprintf(&buffer[size],"Time: %ld.%09ld\n---\n",
data/flent-1.3.2/misc/file_iterate.c:157:7:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	char tmpfile[] = "/tmp/file_iterateXXXXXX";
data/flent-1.3.2/misc/file_iterate.c:158: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).
	int out = a->buffer ? mkstemp(tmpfile) : STDOUT_FILENO;
data/flent-1.3.2/misc/file_iterate.c:158:32:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	int out = a->buffer ? mkstemp(tmpfile) : STDOUT_FILENO;
data/flent-1.3.2/misc/file_iterate.c:181:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[BUFFERSIZE];
data/flent-1.3.2/misc/file_iterate.c:207:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		unlink(tmpfile);
data/flent-1.3.2/misc/tc_iterate.c:136:15:  [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.
		int added = sprintf(&buffer[size],"Time: %ld.%09ld\n---\n",
data/flent-1.3.2/misc/tc_iterate.c:154:7:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	char tmpfile[] = "/tmp/tc_iterateXXXXXX";
data/flent-1.3.2/misc/tc_iterate.c:155: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).
	int out = a->buffer ? mkstemp(tmpfile) : STDOUT_FILENO;
data/flent-1.3.2/misc/tc_iterate.c:155:32:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	int out = a->buffer ? mkstemp(tmpfile) : STDOUT_FILENO;
data/flent-1.3.2/misc/tc_iterate.c:190:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[BUFFERSIZE];
data/flent-1.3.2/misc/tc_iterate.c:191: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 cmd[1024];
data/flent-1.3.2/misc/tc_iterate.c:216:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		unlink(tmpfile);
data/flent-1.3.2/misc/wifistats_iterate.c:67: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 macaddr[6*3];
data/flent-1.3.2/misc/wifistats_iterate.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 airtime_file[256];
data/flent-1.3.2/misc/wifistats_iterate.c:69: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 rc_stats_file[256];
data/flent-1.3.2/misc/wifistats_iterate.c:116:26:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		stations[i].rc_stats = open(stations[i].rc_stats_file,O_RDONLY);
data/flent-1.3.2/misc/wifistats_iterate.c:117:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		stations[i].airtime = open(stations[i].airtime_file,O_RDONLY);
data/flent-1.3.2/misc/wifistats_iterate.c:149:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char  buf[1024];
data/flent-1.3.2/misc/wifistats_iterate.c:165: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 dir[1024];
data/flent-1.3.2/misc/wifistats_iterate.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 dir[MAXPATHLEN];
data/flent-1.3.2/misc/wifistats_iterate.c:189: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 airtime[MAXPATHLEN];
data/flent-1.3.2/misc/wifistats_iterate.c:190: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 rc_stats[MAXPATHLEN];
data/flent-1.3.2/misc/wifistats_iterate.c:236:12:  [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.
			size += sprintf(&buf[size],"Airtime:\n");
data/flent-1.3.2/misc/wifistats_iterate.c:240:12:  [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.
			size += sprintf(&buf[size],"RC stats:\n");
data/flent-1.3.2/misc/wifistats_iterate.c:296:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mtime[40];
data/flent-1.3.2/misc/wifistats_iterate.c:299:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	added = sprintf(mtime,"Time: %ld.%09ld\n",
data/flent-1.3.2/misc/wifistats_iterate.c:327:7:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	char tmpfile[] = "/tmp/wifistats_iterateXXXXXX";
data/flent-1.3.2/misc/wifistats_iterate.c:328: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).
	int out = a->buffer ? mkstemp(tmpfile) : STDOUT_FILENO;
data/flent-1.3.2/misc/wifistats_iterate.c:328:32:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	int out = a->buffer ? mkstemp(tmpfile) : STDOUT_FILENO;
data/flent-1.3.2/misc/wifistats_iterate.c:337:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		unlink(tmpfile); // make it disappear on close
data/flent-1.3.2/misc/wifistats_iterate.c:374:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[BUFFERSIZE];
data/flent-1.3.2/misc/file_iterate.c:134:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((r = read(fp, buffer, bufsize-len)) > 0)
data/flent-1.3.2/misc/file_iterate.c:193:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if(read(timer,&fired,sizeof(fired))!=8) perror("reading timer");
data/flent-1.3.2/misc/file_iterate.c:205:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while((size = read(out, buffer, sizeof(buffer))) > 0)
data/flent-1.3.2/misc/tc_iterate.c:194: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).
	int csize = strlen(cmd);
data/flent-1.3.2/misc/tc_iterate.c:201:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if(read(timer,&fired,sizeof(fired))!=8) perror("reading timer");
data/flent-1.3.2/misc/tc_iterate.c:203:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if((size = read(in,buffer,sizeof(buffer))) > 0) {
data/flent-1.3.2/misc/tc_iterate.c:214:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while((size = read(out, buffer, sizeof(buffer))) > 0)
data/flent-1.3.2/misc/wifistats_iterate.c:237:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if((t = read(s[i].airtime, &buf[size],8192)) > 0) size += t;
data/flent-1.3.2/misc/wifistats_iterate.c:241:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if((t = read(s[i].rc_stats,&buf[size],8192)) > 0) size += t;
data/flent-1.3.2/misc/wifistats_iterate.c:384:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if(read(timer,&fired,sizeof(fired))!=8) perror("reading timer");
data/flent-1.3.2/misc/wifistats_iterate.c:399:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while((size = read(out, buffer, sizeof(buffer))) > 0)

ANALYSIS SUMMARY:

Hits = 56
Lines analyzed = 870 in approximately 0.37 seconds (2326 lines/second)
Physical Source Lines of Code (SLOC) = 626
Hits@level = [0]   9 [1]  11 [2]  33 [3]   3 [4]   9 [5]   0
Hits@level+ = [0+]  65 [1+]  56 [2+]  45 [3+]  12 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 103.834 [1+] 89.4569 [2+] 71.885 [3+] 19.1693 [4+] 14.377 [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.