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/poolcounter-1.1.3/client_data.c
Examining data/poolcounter-1.1.3/client_data.h
Examining data/poolcounter-1.1.3/hash.c
Examining data/poolcounter-1.1.3/hash.h
Examining data/poolcounter-1.1.3/locks.c
Examining data/poolcounter-1.1.3/locks.h
Examining data/poolcounter-1.1.3/main.c
Examining data/poolcounter-1.1.3/stats.c
Examining data/poolcounter-1.1.3/stats.h

FINAL RESULTS:

data/poolcounter-1.1.3/main.c:212:4:  [4] (shell) execvp:
  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.
			execvp( global_argv[0], global_argv );
data/poolcounter-1.1.3/main.c:214:4:  [4] (shell) execl:
  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.
			execl( "/proc/self/exe", "poolcounterd", NULL );
data/poolcounter-1.1.3/stats.c:41:30:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		#define COMMAND(item) n += sprintf( stats_buffer + n, #item ": %" PRcount "\n", stats.item );
data/poolcounter-1.1.3/stats.c:46:59:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		#define COMMAND(item) if ( !strcasecmp( type, #item ) ) sprintf( stats_buffer, #item ": %" PRcount "\n", stats.item ); else
data/poolcounter-1.1.3/main.c:37:16:  [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, "l:" ) ) != -1 ) {
data/poolcounter-1.1.3/client_data.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 buffer[1024];
data/poolcounter-1.1.3/stats.c:10: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 stats_buffer[
data/poolcounter-1.1.3/stats.c:29:6:  [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.
	n = sprintf( stats_buffer, "uptime: %u days, %dh %dm %ds\n", days, hours, minutes, seconds );
data/poolcounter-1.1.3/stats.c:50:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy( stats_buffer, "ERROR WRONG_STAT" );
data/poolcounter-1.1.3/client_data.c:134: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).
	size_t len = strlen(msg);
data/poolcounter-1.1.3/locks.c:84: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).
		uint32_t hash_value = hash( key, strlen( key ), 0 );
data/poolcounter-1.1.3/stats.c:44:3:  [1] (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). Risk is low because the source is a constant character.
		strcpy( stats_buffer + n, "\n" );

ANALYSIS SUMMARY:

Hits = 12
Lines analyzed = 1430 in approximately 0.06 seconds (25801 lines/second)
Physical Source Lines of Code (SLOC) = 1031
Hits@level = [0]  13 [1]   3 [2]   4 [3]   1 [4]   4 [5]   0
Hits@level+ = [0+]  25 [1+]  12 [2+]   9 [3+]   5 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 24.2483 [1+] 11.6392 [2+] 8.72939 [3+] 4.84966 [4+] 3.87973 [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.