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/xxkb-1.11/wlist.h
Examining data/xxkb-1.11/xxkb.h
Examining data/xxkb-1.11/wlist.c
Examining data/xxkb-1.11/xxkb.c
Examining data/xxkb-1.11/resource.c

FINAL RESULTS:

data/xxkb-1.11/resource.c:164: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(*((char**) value), val.addr);
data/xxkb-1.11/resource.c:248:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(res_name, "%s.geometry", window_name);
data/xxkb-1.11/resource.c:256:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(res_name, "%s.gravity", window_name);
data/xxkb-1.11/resource.c:287:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(res_name, "%s.label.enable", window_name);
data/xxkb-1.11/resource.c:294:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(res_name, "%s.label.font", window_name);
data/xxkb-1.11/resource.c:297:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(res_name, "%s.label.background", window_name);
data/xxkb-1.11/resource.c:299:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(res_name, "%s.label.foreground", window_name);
data/xxkb-1.11/resource.c:303:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(res_name, "%s.label.text.%d", window_name, i + 1);
data/xxkb-1.11/resource.c:344:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(res_name, "%s.image.%d", window_name, i + 1);
data/xxkb-1.11/resource.c:366:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
					sprintf(fullname, "%s/%s", imgpath, filename);
data/xxkb-1.11/resource.c:586:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(filename, "%s/%s", APPDEFDIR, APPDEFFILE);
data/xxkb-1.11/resource.c:617:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(filename, "%s/%s", homedir, USERDEFFILE);
data/xxkb-1.11/resource.c:644:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(filename, "%s/%s", homedir, USERDEFFILE);
data/xxkb-1.11/resource.c:652:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(res_ctrls, "controls.%s", ControlsTable[i].name);
data/xxkb-1.11/resource.c:796:3:  [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(new_list, orig_list);
data/xxkb-1.11/resource.c:799:2:  [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(new_list, app_ident);
data/xxkb-1.11/resource.c:952:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(res_name, res_patt, match, action);
data/xxkb-1.11/xxkb.c:1353: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(result, APPNAME);
data/xxkb-1.11/xxkb.c:1355:2:  [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(result, string);
data/xxkb-1.11/resource.c:571:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	homedir = getenv("HOME");
data/xxkb-1.11/resource.c:240: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 res_name[64], *str_geom, *str_gravity;
data/xxkb-1.11/resource.c:338: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 res_name[64], *filename, *fullname, *imgpath;
data/xxkb-1.11/resource.c:559: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_list, *res_app_list, res_ctrls[256];
data/xxkb-1.11/wlist.c:92: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((void*) &pt->state, (void*) state, sizeof(kbdState));
data/xxkb-1.11/xxkb.c:86: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 *display_name, buf[64];
data/xxkb-1.11/xxkb.c:125: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(buf, "_NET_SYSTEM_TRAY_S%d", scr);
data/xxkb-1.11/resource.c:159:9:  [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(val.addr);
data/xxkb-1.11/resource.c:277:52:  [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(str_gravity, GravityTable[i].name, strlen(GravityTable[i].name))) {
data/xxkb-1.11/resource.c:354: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).
					len = strlen(imgpath) + 1 + strlen(filename);
data/xxkb-1.11/resource.c:354: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(imgpath) + 1 + strlen(filename);
data/xxkb-1.11/resource.c:425:43:  [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).
				- font_struct->min_bounds.lbearing) * strlen(label)) / 2;
data/xxkb-1.11/resource.c:435: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).
		    label, strlen(label));
data/xxkb-1.11/resource.c:580: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).
	len = strlen(APPDEFDIR) + 1 + strlen(APPDEFFILE);
data/xxkb-1.11/resource.c:580: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).
	len = strlen(APPDEFDIR) + 1 + strlen(APPDEFFILE);
data/xxkb-1.11/resource.c:610: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).
	len = strlen(homedir) + 1 + strlen(USERDEFFILE);
data/xxkb-1.11/resource.c:610: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).
	len = strlen(homedir) + 1 + strlen(USERDEFFILE);
data/xxkb-1.11/resource.c:637:9:  [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(homedir) + 1 + strlen(USERDEFFILE);
data/xxkb-1.11/resource.c:637: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).
		len = strlen(homedir) + 1 + strlen(USERDEFFILE);
data/xxkb-1.11/resource.c:776: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).
	len = strlen(app_ident);
data/xxkb-1.11/resource.c:781: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(orig_list);
data/xxkb-1.11/resource.c:797:3:  [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(new_list, " ");
data/xxkb-1.11/resource.c:865: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).
	len = strlen(str);
data/xxkb-1.11/resource.c:945: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).
	len = strlen(res_patt) + strlen(match) + strlen(action);
data/xxkb-1.11/resource.c:945: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).
	len = strlen(res_patt) + strlen(match) + strlen(action);
data/xxkb-1.11/resource.c:945:43:  [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(res_patt) + strlen(match) + strlen(action);
data/xxkb-1.11/xxkb.c:236: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).
					(unsigned char*) APPNAME, strlen(APPNAME));
data/xxkb-1.11/xxkb.c:1346: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).
	len = strlen(APPNAME) + 1 + strlen(string);
data/xxkb-1.11/xxkb.c:1346: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).
	len = strlen(APPNAME) + 1 + strlen(string);
data/xxkb-1.11/xxkb.c:1354:2:  [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(result, ".");

ANALYSIS SUMMARY:

Hits = 49
Lines analyzed = 2568 in approximately 0.06 seconds (42243 lines/second)
Physical Source Lines of Code (SLOC) = 2020
Hits@level = [0]   0 [1]  23 [2]   6 [3]   1 [4]  19 [5]   0
Hits@level+ = [0+]  49 [1+]  49 [2+]  26 [3+]  20 [4+]  19 [5+]   0
Hits/KSLOC@level+ = [0+] 24.2574 [1+] 24.2574 [2+] 12.8713 [3+] 9.90099 [4+] 9.40594 [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.