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/lmemory-0.6c/list.c Examining data/lmemory-0.6c/lmem_menu.c Examining data/lmemory-0.6c/mmain.c Examining data/lmemory-0.6c/lmemory.h Examining data/lmemory-0.6c/lmem_level.c Examining data/lmemory-0.6c/xpm_widget.c Examining data/lmemory-0.6c/lmem_menu.h Examining data/lmemory-0.6c/support.c Examining data/lmemory-0.6c/support.h Examining data/lmemory-0.6c/help.h Examining data/lmemory-0.6c/lmem_window.c Examining data/lmemory-0.6c/help.c FINAL RESULTS: data/lmemory-0.6c/support.c:152: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 (full_filename, directory); data/lmemory-0.6c/support.c:153: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 (full_filename, G_DIR_SEPARATOR_S); data/lmemory-0.6c/support.c:154: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 (full_filename, filename); data/lmemory-0.6c/lmem_window.c:376:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand ((int) t1); data/lmemory-0.6c/mmain.c:27:20: [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. lmem_image_dir = getenv("LMEM_PIX_DIR"); data/lmemory-0.6c/lmem_window.c:288:7: [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. const char *indicator[5] = {"Little One","Beginner","Skilled","Master","Daemon"}; data/lmemory-0.6c/lmemory.h:13:7: [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. const char *indicator[5]; data/lmemory-0.6c/mmain.c:18: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 buf[40]; data/lmemory-0.6c/list.c:46:20: [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). name = filename + strlen(filename) - 4; data/lmemory-0.6c/support.c:150:38: [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). full_filename = (gchar*) g_malloc (strlen (directory) + 1 data/lmemory-0.6c/support.c:151:40: [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). + strlen (filename) + 1); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 1274 in approximately 0.05 seconds (26678 lines/second) Physical Source Lines of Code (SLOC) = 857 Hits@level = [0] 1 [1] 3 [2] 3 [3] 2 [4] 3 [5] 0 Hits@level+ = [0+] 12 [1+] 11 [2+] 8 [3+] 5 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 14.0023 [1+] 12.8355 [2+] 9.33489 [3+] 5.83431 [4+] 3.50058 [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.