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/libmatekbd-1.24.1/libmatekbd/matekbd-config-private.h Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-desktop-config.c Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-desktop-config.h Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-indicator-config.c Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-indicator-config.h Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-indicator.c Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-indicator.h Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.h Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-drawing.c Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-drawing.h Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-status.c Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-status.h Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-util.c Examining data/libmatekbd-1.24.1/libmatekbd/matekbd-util.h Examining data/libmatekbd-1.24.1/test/matekbd-indicator-test.c Examining data/libmatekbd-1.24.1/test/matekbd-keyboard-drawing-test.c Examining data/libmatekbd-1.24.1/test/matekbd-status-test.c FINAL RESULTS: data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:139: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 (buffer, parent); data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:145: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 (buffer, child); data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:170: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 (*child = cbuffer, pos + 1); data/libmatekbd-1.24.1/libmatekbd/matekbd-indicator-config.c:241:27: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. g_build_filename (g_get_home_dir data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:174: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 (*parent = pbuffer, merged, plen); data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:223: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 group[XKL_MAX_CI_NAME_LENGTH]; data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-drawing.c:2800: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 title[128] = ""; data/libmatekbd-1.24.1/libmatekbd/matekbd-status.c:352: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 pngfilename[20]; data/libmatekbd-1.24.1/libmatekbd/matekbd-util.c:126: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 (new_arr, arr, old_length * sizeof (gchar *)); data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:137: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 (parent) >= XKL_MAX_CI_NAME_LENGTH) data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:142: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 (child) >= XKL_MAX_CI_NAME_LENGTH) data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:144: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 (buffer, "\t"); data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:165: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). plen = strlen (merged); data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:168: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 (pos + 1) >= XKL_MAX_CI_NAME_LENGTH) data/libmatekbd-1.24.1/libmatekbd/matekbd-keyboard-config.c:232:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (group, option, len); ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 7457 in approximately 0.18 seconds (40642 lines/second) Physical Source Lines of Code (SLOC) = 5646 Hits@level = [0] 31 [1] 6 [2] 5 [3] 1 [4] 3 [5] 0 Hits@level+ = [0+] 46 [1+] 15 [2+] 9 [3+] 4 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 8.14736 [1+] 2.65675 [2+] 1.59405 [3+] 0.708466 [4+] 0.53135 [5+] 0 Dot directories skipped = 3 (--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.