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/9wm-1.4.1/9wm.c Examining data/9wm-1.4.1/client.c Examining data/9wm-1.4.1/cursor.c Examining data/9wm-1.4.1/dat.h Examining data/9wm-1.4.1/error.c Examining data/9wm-1.4.1/event.c Examining data/9wm-1.4.1/fns.h Examining data/9wm-1.4.1/grab.c Examining data/9wm-1.4.1/manage.c Examining data/9wm-1.4.1/menu.c FINAL RESULTS: data/9wm-1.4.1/9wm.c:277: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(s->display, ds); data/9wm-1.4.1/event.c:306:3: [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(myargv[0], myargv); data/9wm-1.4.1/menu.c:116: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(shell, shell, "-c", prog, NULL); data/9wm-1.4.1/menu.c:120:3: [4] (shell) execlp: 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. execlp("xterm", "xterm", NULL); data/9wm-1.4.1/9wm.c:163:19: [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. shell = (char *) getenv("SHELL"); data/9wm-1.4.1/9wm.c:276: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(s->display, "DISPLAY="); data/9wm-1.4.1/9wm.c:282:3: [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(dot1, ".%d", i); data/9wm-1.4.1/cursor.c:15:11: [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. unsigned char mask[64]; data/9wm-1.4.1/cursor.c:16:11: [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. unsigned char fore[64]; data/9wm-1.4.1/dat.h:88: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[256]; /* arbitrary limit */ data/9wm-1.4.1/error.c:27: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 msg[80], req[80], number[80]; data/9wm-1.4.1/error.c:38: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(number, "%d", e->request_code); data/9wm-1.4.1/error.c:41:3: [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(req, "<request-code-%d>", e->request_code); data/9wm-1.4.1/menu.c:20:1: [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 *b3items[B3FIXED + MAXHIDDEN + 1] = { data/9wm-1.4.1/9wm.c:281:19: [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). dot1 = colon + strlen(colon); /* if not there, append */ data/9wm-1.4.1/grab.c:67:39: [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). wide = XTextWidth(font, m->item[n], strlen(m->item[n])) + 4; data/9wm-1.4.1/grab.c:170:42: [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). tx = (wide - XTextWidth(font, item, strlen(item))) / 2; data/9wm-1.4.1/grab.c:175:55: [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). XDrawString(dpy, s->menuwin, s->gc, tx, ty, item, strlen(item)); ANALYSIS SUMMARY: Hits = 18 Lines analyzed = 2933 in approximately 0.07 seconds (43235 lines/second) Physical Source Lines of Code (SLOC) = 2531 Hits@level = [0] 44 [1] 4 [2] 9 [3] 1 [4] 4 [5] 0 Hits@level+ = [0+] 62 [1+] 18 [2+] 14 [3+] 5 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 24.4962 [1+] 7.11181 [2+] 5.53141 [3+] 1.9755 [4+] 1.5804 [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.