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/libx11-guitest-perl-0.28/KeyUtil.h
Examining data/libx11-guitest-perl-0.28/recorder/src/record.c
Examining data/libx11-guitest-perl-0.28/recorder/src/main.h
Examining data/libx11-guitest-perl-0.28/recorder/src/script_file.h
Examining data/libx11-guitest-perl-0.28/recorder/src/record_event.h
Examining data/libx11-guitest-perl-0.28/recorder/src/main.c
Examining data/libx11-guitest-perl-0.28/recorder/src/script_file.c
Examining data/libx11-guitest-perl-0.28/recorder/src/record.h
Examining data/libx11-guitest-perl-0.28/Common.h
Examining data/libx11-guitest-perl-0.28/KeyUtil.c
Examining data/libx11-guitest-perl-0.28/GUITest.h

FINAL RESULTS:

data/libx11-guitest-perl-0.28/recorder/src/main.c:198:6:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
					strcat(keyBuffer, mod);
data/libx11-guitest-perl-0.28/recorder/src/main.c:210:7:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
						strcat(keyBuffer, nam);
data/libx11-guitest-perl-0.28/recorder/src/main.c:216:7:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
						strcat(keyBuffer, nam);
data/libx11-guitest-perl-0.28/recorder/src/script_file.c:52:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf(buffer, format, args);
data/libx11-guitest-perl-0.28/recorder/src/main.c:44: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 buttonName[MAX_MBUTTON_NAME] = "\0";
data/libx11-guitest-perl-0.28/recorder/src/main.c:45: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 keyBuffer[MAX_KEY_BUFFER] = "\0";
data/libx11-guitest-perl-0.28/recorder/src/main.c:140: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(button, "M_LEFT");
data/libx11-guitest-perl-0.28/recorder/src/main.c:142: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(button, "M_MIDDLE");
data/libx11-guitest-perl-0.28/recorder/src/main.c:144: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(button, "M_RIGHT");
data/libx11-guitest-perl-0.28/recorder/src/main.c:146: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(button, "M_UP");
data/libx11-guitest-perl-0.28/recorder/src/main.c:148: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(button, "M_DOWN");
data/libx11-guitest-perl-0.28/recorder/src/main.c:247: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(&lastEvent, &ev, sizeof(struct record_event));
data/libx11-guitest-perl-0.28/recorder/src/script_file.c:34:8:  [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).
	sfp = fopen(scriptFile, "wt");
data/libx11-guitest-perl-0.28/recorder/src/script_file.c:49: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[MAX_SCRIPT_BUFFER] = "\0";
data/libx11-guitest-perl-0.28/recorder/src/main.c:107:2:  [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.
	usleep(waitSeconds * 1000000);
data/libx11-guitest-perl-0.28/recorder/src/main.c:168: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).
	int len = strlen(keyBuffer);
data/libx11-guitest-perl-0.28/recorder/src/main.c:199:6:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
					strcat(keyBuffer, "(");
data/libx11-guitest-perl-0.28/recorder/src/main.c:201:6:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
					strcat(keyBuffer, ")");
data/libx11-guitest-perl-0.28/recorder/src/main.c:207: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).
					if (strlen(nam) > 1) {
data/libx11-guitest-perl-0.28/recorder/src/main.c:209:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
						strcat(keyBuffer, "{"); 
data/libx11-guitest-perl-0.28/recorder/src/main.c:211:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
						strcat(keyBuffer, "}");
data/libx11-guitest-perl-0.28/recorder/src/main.c:214:8:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
							strcat(keyBuffer, "\\");
data/libx11-guitest-perl-0.28/recorder/src/script_file.c:53: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).
	fwrite(buffer, sizeof(char), strlen(buffer), sfp);

ANALYSIS SUMMARY:

Hits = 23
Lines analyzed = 955 in approximately 0.06 seconds (17069 lines/second)
Physical Source Lines of Code (SLOC) = 610
Hits@level = [0]  18 [1]   9 [2]  10 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+]  41 [1+]  23 [2+]  14 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 67.2131 [1+] 37.7049 [2+] 22.9508 [3+] 6.55738 [4+] 6.55738 [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.